Module: Rucoa::NodeConcerns::Body

Instance Method Summary collapse

Instance Method Details

#bodyRucoa::Nodes::BeginNode?

Returns:



7
8
9
# File 'lib/rucoa/node_concerns/body.rb', line 7

def body
  children.last
end

#body_childrenArray<Rucoa::Nodes::Base>

Returns:



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