Class: Analyst::Entities::Hash
- Inherits:
-
Entity
- Object
- Entity
- Analyst::Entities::Hash
- Defined in:
- lib/analyst/entities/hash.rb
Instance Method Summary collapse
Instance Method Details
#pairs ⇒ Object
5 6 7 |
# File 'lib/analyst/entities/hash.rb', line 5 def pairs @pairs ||= process_nodes(ast.children) end |
#to_hash ⇒ Object
9 10 11 12 13 14 |
# File 'lib/analyst/entities/hash.rb', line 9 def to_hash @pairs.inject({}) do |hash, pair| hash[pair.key] = pair.value hash end end |