Class: Rucoa::Nodes::EnsureNode

Inherits:
Base
  • Object
show all
Defined in:
lib/rucoa/nodes/ensure_node.rb

Instance Method Summary collapse

Methods inherited from Base

#ancestors, #child_nodes, #descendant_nodes, #each_ancestor, #each_child_node, #each_descendant_node, #include_position?, #initialize, #module_nesting, #namespace, #next_sibling_nodes, #parent, #parent=, #previous_sibling_nodes, #updated

Constructor Details

This class inherits a constructor from Rucoa::Nodes::Base

Instance Method Details

#bodyRucoa::Nodes::Base?

Returns:



7
8
9
# File 'lib/rucoa/nodes/ensure_node.rb', line 7

def body
  children[0]
end

#rescueRucoa::Nodes::RescueNode?

Returns:



12
13
14
15
16
# File 'lib/rucoa/nodes/ensure_node.rb', line 12

def rescue
  return unless body.is_a?(Nodes::RescueNode)

  body
end