Module: Trxl::HashEntryList2

Defined in:
lib/trxl/trxl_grammar.rb

Instance Method Summary collapse

Instance Method Details

#eval(env = Environment.new) ⇒ Object



2447
2448
2449
2450
2451
# File 'lib/trxl/trxl_grammar.rb', line 2447

def eval(env = Environment.new)
  hash_entries.inject({}) do |hash, entry|
    hash.merge(entry.eval(env))
  end
end

#hash_entriesObject



2453
2454
2455
# File 'lib/trxl/trxl_grammar.rb', line 2453

def hash_entries
  [ hash_entry ] + tail.elements.map { |e| e.hash_entry }
end