Class: RKelly::Nodes::TryNode

Inherits:
Node
  • Object
show all
Defined in:
lib/rkelly/nodes/try_node.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#comments, #filename, #line, #value

Instance Method Summary collapse

Methods inherited from Node

#==, #===, #each, #pointcut, #to_dots, #to_ecma, #to_real_sexp, #to_sexp

Methods included from Visitable

#accept

Constructor Details

#initialize(value, catch_var, catch_block, finally_block = nil) ⇒ TryNode

Returns a new instance of TryNode.



5
6
7
8
9
10
# File 'lib/rkelly/nodes/try_node.rb', line 5

def initialize(value, catch_var, catch_block, finally_block = nil)
  super(value)
  @catch_var = catch_var
  @catch_block = catch_block
  @finally_block = finally_block
end

Instance Attribute Details

#catch_blockObject (readonly)

Returns the value of attribute catch_block.



4
5
6
# File 'lib/rkelly/nodes/try_node.rb', line 4

def catch_block
  @catch_block
end

#catch_varObject (readonly)

Returns the value of attribute catch_var.



4
5
6
# File 'lib/rkelly/nodes/try_node.rb', line 4

def catch_var
  @catch_var
end

#finally_blockObject (readonly)

Returns the value of attribute finally_block.



4
5
6
# File 'lib/rkelly/nodes/try_node.rb', line 4

def finally_block
  @finally_block
end