Class: Zapata::Primitive::Basic
- Defined in:
- lib/zapata/primitive/basic.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#dive_deeper, #initialize, #name, #return_with_missing_as_super, #return_with_super_as_missing
Constructor Details
This class inherits a constructor from Zapata::Primitive::Base
Instance Method Details
#node ⇒ Object
10 11 12 13 14 |
# File 'lib/zapata/primitive/basic.rb', line 10 def node body = @code type = @code.type OpenStruct.new(type: type, body: body) end |
#to_a ⇒ Object
6 7 8 |
# File 'lib/zapata/primitive/basic.rb', line 6 def to_a [value] end |