Class: EacRubyUtils::RecursiveBuilder

Inherits:
Object
  • Object
show all
Includes:
SimpleCache
Defined in:
lib/eac_ruby_utils/recursive_builder.rb

Constant Summary

Constants included from SimpleCache

SimpleCache::UNCACHED_METHOD_NAME_SUFFIX, SimpleCache::UNCACHED_METHOD_PATTERN

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from SimpleCache

#method_missing, #reset_cache, #respond_to_missing?, #sanitize_cache_key, uncached_method_name

Constructor Details

#initialize(root, &neighbors_block) ⇒ RecursiveBuilder

Returns a new instance of RecursiveBuilder.



11
12
13
14
# File 'lib/eac_ruby_utils/recursive_builder.rb', line 11

def initialize(root, &neighbors_block)
  @root = root
  @neighbors_block = neighbors_block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class EacRubyUtils::SimpleCache

Instance Attribute Details

#neighbors_blockObject (readonly)

Returns the value of attribute neighbors_block.



9
10
11
# File 'lib/eac_ruby_utils/recursive_builder.rb', line 9

def neighbors_block
  @neighbors_block
end

#rootObject (readonly)

Returns the value of attribute root.



9
10
11
# File 'lib/eac_ruby_utils/recursive_builder.rb', line 9

def root
  @root
end