Class: RubyCop::Ruby::IfMod
- Defined in:
- lib/ruby_cop/ruby/if.rb
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) ⇒ IfMod
constructor
A new instance of IfMod.
Methods inherited from Statements
#to_block, #to_chained_block, #to_program
Methods inherited from List
Methods inherited from Node
Constructor Details
#initialize(expression, statements) ⇒ IfMod
Returns a new instance of IfMod.
18 19 20 21 |
# File 'lib/ruby_cop/ruby/if.rb', line 18 def initialize(expression, statements) @expression = expression super(statements) end |
Instance Attribute Details
#expression ⇒ Object (readonly)
Returns the value of attribute expression.
22 23 24 |
# File 'lib/ruby_cop/ruby/if.rb', line 22 def expression @expression end |