Class: Rubycop::Analyzer::Ruby::When
- Inherits:
-
ChainedBlock
- Object
- Node
- List
- Statements
- Block
- ChainedBlock
- Rubycop::Analyzer::Ruby::When
- Defined in:
- lib/rubycop/analyzer/ruby/case.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Attributes inherited from ChainedBlock
Attributes inherited from Block
Attributes inherited from List
Instance Method Summary collapse
-
#initialize(expression, statements, block = nil) ⇒ When
constructor
A new instance of When.
Methods inherited from Statements
#to_block, #to_chained_block, #to_program
Methods inherited from List
Methods inherited from Node
Constructor Details
#initialize(expression, statements, block = nil) ⇒ When
Returns a new instance of When.
15 16 17 18 |
# File 'lib/rubycop/analyzer/ruby/case.rb', line 15 def initialize(expression, statements, block=nil) @expression = expression super([block], statements) end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
20 21 22 |
# File 'lib/rubycop/analyzer/ruby/case.rb', line 20 def expression @expression end |