Class: RubyCop::Ruby::For
- Defined in:
- lib/ruby_cop/ruby/for.rb
Instance Attribute Summary collapse
-
#range ⇒ Object
readonly
Returns the value of attribute range.
-
#statements ⇒ Object
readonly
Returns the value of attribute statements.
-
#variable ⇒ Object
readonly
Returns the value of attribute variable.
Attributes inherited from Block
Attributes inherited from List
Instance Method Summary collapse
-
#initialize(variable, range, statements) ⇒ For
constructor
A new instance of For.
Methods inherited from Statements
#to_block, #to_chained_block, #to_program
Methods inherited from List
Methods inherited from Node
Constructor Details
#initialize(variable, range, statements) ⇒ For
Returns a new instance of For.
4 5 6 7 8 |
# File 'lib/ruby_cop/ruby/for.rb', line 4 def initialize(variable, range, statements) @variable = variable @range = range @statements = statements end |
Instance Attribute Details
#range ⇒ Object (readonly)
Returns the value of attribute range.
11 12 13 |
# File 'lib/ruby_cop/ruby/for.rb', line 11 def range @range end |
#statements ⇒ Object (readonly)
Returns the value of attribute statements.
12 13 14 |
# File 'lib/ruby_cop/ruby/for.rb', line 12 def statements @statements end |
#variable ⇒ Object (readonly)
Returns the value of attribute variable.
10 11 12 |
# File 'lib/ruby_cop/ruby/for.rb', line 10 def variable @variable end |