Module: FSSM::Tree::NodeBase

### Home Classes Methods

### In Files

- lib/fssm/tree.rb

### Methods

- ::new
- #child
- #child!
- #has_child?
- #remove_child
- #remove_children

### Class/Module Index

Quicksearch

- FSSM
- FSSM::Backends
- FSSM::Backends::Inotify
- FSSM::Backends::Polling
- FSSM::Backends::RBFSEvent
- FSSM::Monitor
- FSSM::Path
- FSSM::Pathname
- FSSM::State
- FSSM::State::Directory
- FSSM::State::File
- FSSM::Support
- FSSM::Tree
- FSSM::Tree::Cache
- FSSM::Tree::CacheDebug
- FSSM::Tree::Node
- FSSM::Tree::NodeBase
- FSSM::Tree::NodeEnumerable
- FSSM::Tree::NodeInsertion

No matching classes.

# FSSM::Tree::NodeBase

### Public Class Methods

new() click to toggle source

    # File lib/fssm/tree.rb, line 3
    def initialize
      @children = {}
    end

### Protected Instance Methods

child(segment) click to toggle source

    # File lib/fssm/tree.rb, line 9
    def child(segment)
      @children["#{segment}"]
    end

child!(segment) click to toggle source

    # File lib/fssm/tree.rb, line 13
    def child!(segment)
      (@children["#{segment}"] ||= Node.new)
    end

has_child?(segment) click to toggle source

    # File lib/fssm/tree.rb, line 17
    def has_child?(segment)
      @children.has_key?("#{segment}")
    end

remove_child(segment) click to toggle source

    # File lib/fssm/tree.rb, line 21
    def remove_child(segment)
      @children.delete("#{segment}")
    end

remove_children() click to toggle source

    # File lib/fssm/tree.rb, line 25
    def remove_children
      @children.clear
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.