Class: Riml::CurlyBracePart
- Inherits:
-
Struct
- Object
- Struct
- Riml::CurlyBracePart
show all
- Includes:
- Visitable
- Defined in:
- lib/riml/nodes.rb
Constant Summary
Constants included
from Visitable
Visitable::EMPTY_CHILDREN
Instance Attribute Summary collapse
Attributes included from Visitable
#compiled_output, #force_newline, #parent_node, #parser_info, #scope
Instance Method Summary
collapse
Methods included from Visitable
#accept, #location_info
Methods included from Walkable
#child_after, #child_previous_to, #each, #index_by_children, #index_by_member, #insert_after, #insert_before, #next, #previous, #remove, #replace_with
Instance Attribute Details
#value ⇒ Object
Returns the value of attribute value
562
563
564
|
# File 'lib/riml/nodes.rb', line 562
def value
@value
end
|
Instance Method Details
#children ⇒ Object
578
579
580
581
582
583
584
585
586
|
# File 'lib/riml/nodes.rb', line 578
def children
if !interpolated?
[]
elsif nested?
value
else
[value]
end
end
|
#force_newline_if_child_call_node? ⇒ Boolean
574
575
576
|
# File 'lib/riml/nodes.rb', line 574
def force_newline_if_child_call_node?
false
end
|
#nested? ⇒ Boolean
570
571
572
|
# File 'lib/riml/nodes.rb', line 570
def nested?
value.is_a?(Array) && value.detect {|part| part.is_a?(CurlyBracePart)}
end
|