Class: Ruby::Hash

Inherits:
DelimitedList show all
Includes:
Alternation::Hash
Defined in:
lib/ruby/hash.rb

Instance Attribute Summary

Attributes included from Node::Composite

#parent

Instance Method Summary collapse

Methods included from Alternation::Hash

#[], #[]=, #delete

Methods inherited from DelimitedList

#initialize, #nodes

Methods inherited from List

#initialize, #method_missing, #nodes

Methods included from Alternation::List

#<<, #[]=, #pop

Methods included from Conversions::List

#to_array

Methods inherited from Aggregate

#position, #position=, #prolog, #prolog=, #to_ruby

Methods inherited from Node

#<=>, #all_nodes, #column, #length, #nodes, #row

Methods included from Conversions

included, #to_node

Methods included from Node::Traversal

#has_token?, #has_type?, #has_value?, #is_instance_of?, #left_of?, #matches?, #position?, #right_of?, #select

Methods included from Node::Source

#context, #filename, #line, #lines, #src

Methods included from Node::Composite

included, #root, #root?

Constructor Details

This class inherits a constructor from Ruby::DelimitedList

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ruby::List

Instance Method Details

#valueObject



8
9
10
11
12
# File 'lib/ruby/hash.rb', line 8

def value
  code = to_ruby(false)
  code = "{#{code}}" unless ldelim
  eval(code) rescue {}
end