Class: Estreet::Program

Inherits:
Node
  • Object
show all
Defined in:
lib/estreet/program.rb

Instance Attribute Summary

Attributes inherited from Node

#source_location

Instance Method Summary collapse

Methods inherited from Node

#as_json, #loc, #type

Constructor Details

#initialize(body) ⇒ Program

Returns a new instance of Program.



3
4
5
# File 'lib/estreet/program.rb', line 3

def initialize(body)
  @body = Array(body).map {|s| s.to_statement }
end

Instance Method Details

#attributesObject



7
8
9
# File 'lib/estreet/program.rb', line 7

def attributes
  super.merge(body: @body)
end