Class: Melbourne::AST::Begin
- Defined in:
- lib/melbourne/ast/exceptions.rb
Overview
A begin statement as in:
begin
do
rescue
puts 'error'
end
Instance Attribute Summary collapse
-
#rescue ⇒ Object
The
rescuestatement to thebeginstatement id there is any.
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(line, body) ⇒ Begin
constructor
A new instance of Begin.
Methods inherited from Node
Constructor Details
#initialize(line, body) ⇒ Begin
Returns a new instance of Begin.
19 20 21 22 |
# File 'lib/melbourne/ast/exceptions.rb', line 19 def initialize(line, body) @line = line @rescue = body end |
Instance Attribute Details
#rescue ⇒ Object
The rescue statement to the begin statement id there is any
17 18 19 |
# File 'lib/melbourne/ast/exceptions.rb', line 17 def rescue @rescue end |