Class: Ruby::NamedBlock
- Inherits:
-
Block
- Object
- Node
- Aggregate
- List
- DelimitedList
- Statements
- Block
- Ruby::NamedBlock
- Defined in:
- lib/ruby/block.rb
Instance Attribute Summary
Attributes included from Ruby::Node::Composite
Instance Method Summary collapse
-
#initialize(identifier, statements, params = nil, ldelim = nil, rdelim = nil) ⇒ NamedBlock
constructor
A new instance of NamedBlock.
- #nodes ⇒ Object
Methods included from Conversions::Statements
#to_block, #to_chained_block, #to_named_block, #to_program
Methods inherited from List
Methods included from Alternation::List
Methods included from Conversions::List
Methods inherited from Aggregate
#position, #position=, #prolog, #prolog=, #to_ruby
Methods inherited from Node
#<=>, #all_nodes, #column, #length, #row
Methods included from Conversions
Methods included from Ruby::Node::Traversal
#has_token?, #has_type?, #has_value?, #is_instance_of?, #left_of?, #matches?, #position?, #right_of?, #select
Methods included from Ruby::Node::Source
#context, #filename, #line, #lines, #src
Methods included from Ruby::Node::Composite
Constructor Details
#initialize(identifier, statements, params = nil, ldelim = nil, rdelim = nil) ⇒ NamedBlock
Returns a new instance of NamedBlock.
20 21 22 23 |
# File 'lib/ruby/block.rb', line 20 def initialize(identifier, statements, params = nil, ldelim = nil, rdelim = nil) self.identifier = identifier super(statements, params, ldelim, rdelim) end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Ruby::List
Instance Method Details
#nodes ⇒ Object
25 26 27 |
# File 'lib/ruby/block.rb', line 25 def nodes [identifier, super].flatten.compact end |