Class: Ruby::Case
- Inherits:
-
NamedAggregate
- Object
- Node
- Aggregate
- DelimitedAggregate
- NamedAggregate
- Ruby::Case
- Defined in:
- lib/ruby/case.rb
Instance Attribute Summary
Attributes included from Node::Composite
Instance Method Summary collapse
-
#initialize(identifier, expression, block, rdelim) ⇒ Case
constructor
A new instance of Case.
- #nodes ⇒ Object
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 Node::Traversal
#has_token?, #has_type?, #has_value?, #is_instance_of?, #left_of?, #matches?, #position?, #right_of?, #select
Methods included from Node::Source
#context, #filename, #line, #lines, #src
Methods included from Node::Composite
Constructor Details
#initialize(identifier, expression, block, rdelim) ⇒ Case
Returns a new instance of Case.
7 8 9 10 11 |
# File 'lib/ruby/case.rb', line 7 def initialize(identifier, expression, block, rdelim) self.expression = expression self.block = block super(identifier, nil, rdelim) end |
Instance Method Details
#nodes ⇒ Object
13 14 15 |
# File 'lib/ruby/case.rb', line 13 def nodes [identifier, expression, block, rdelim].compact end |