Class: RubyCop::Ruby::WhileMod
- Defined in:
- lib/ruby_cop/ruby/while.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#expression ⇒ Object
readonly
Returns the value of attribute expression.
Attributes inherited from Block
Attributes inherited from List
Instance Method Summary collapse
-
#initialize(expression, statements) ⇒ WhileMod
constructor
A new instance of WhileMod.
Methods inherited from Statements
#to_block, #to_chained_block, #to_program
Methods inherited from List
Methods inherited from Node
Constructor Details
#initialize(expression, statements) ⇒ WhileMod
Returns a new instance of WhileMod.
13 14 15 16 |
# File 'lib/ruby_cop/ruby/while.rb', line 13 def initialize(expression, statements) @expression = expression super(statements) end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
18 19 20 |
# File 'lib/ruby_cop/ruby/while.rb', line 18 def expression @expression end |