Class: Rubycop::Analyzer::Ruby::While
- Defined in:
- lib/rubycop/analyzer/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) ⇒ While
constructor
A new instance of While.
Methods inherited from Statements
#to_block, #to_chained_block, #to_program
Methods inherited from List
Methods inherited from Node
Constructor Details
#initialize(expression, statements) ⇒ While
Returns a new instance of While.
5 6 7 8 |
# File 'lib/rubycop/analyzer/ruby/while.rb', line 5 def initialize(expression, statements) @expression = expression super(statements) end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
10 11 12 |
# File 'lib/rubycop/analyzer/ruby/while.rb', line 10 def expression @expression end |