Class: Melbourne::AST::HashLiteral

Inherits:
Node
  • Object
show all
Defined in:
lib/melbourne/ast/literals.rb

Overview

An hash literal as in:

{ :a => :b }

Instance Attribute Summary collapse

Attributes inherited from Node

#line

Instance Method Summary collapse

Methods inherited from Node

#ascii_graph

Constructor Details

#initialize(line, array) ⇒ HashLiteral

Returns a new instance of HashLiteral.



73
74
75
76
# File 'lib/melbourne/ast/literals.rb', line 73

def initialize(line, array)
  @line = line
  @array = array
end

Instance Attribute Details

#arrayObject

The actual values in the hash literal



71
72
73
# File 'lib/melbourne/ast/literals.rb', line 71

def array
  @array
end