Module: Rucoa::NodeConcerns::Body
- Included in:
- Rucoa::Nodes::BeginNode, Rucoa::Nodes::BlockNode, Rucoa::Nodes::ClassNode, Rucoa::Nodes::DefNode, Rucoa::Nodes::ModuleNode
- Defined in:
- lib/rucoa/node_concerns/body.rb
Instance Method Summary collapse
Instance Method Details
#body ⇒ Rucoa::Nodes::BeginNode?
7 8 9 |
# File 'lib/rucoa/node_concerns/body.rb', line 7 def body children.last end |
#body_children ⇒ Array<Rucoa::Nodes::Base>
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/rucoa/node_concerns/body.rb', line 12 def body_children case body when Nodes::BeginNode body.children when nil [] else [body] end end |