Class: Rubycop::Analyzer::Ruby::IfMod

Inherits:
Block show all
Defined in:
lib/rubycop/analyzer/ruby/if.rb

Direct Known Subclasses

RescueMod, UnlessMod

Instance Attribute Summary collapse

Attributes inherited from Block

#params

Attributes inherited from List

#elements

Instance Method Summary collapse

Methods inherited from Statements

#to_block, #to_chained_block, #to_program

Methods inherited from List

#add

Methods inherited from Node

#accept

Constructor Details

#initialize(expression, statements) ⇒ IfMod

Returns a new instance of IfMod.



19
20
21
22
# File 'lib/rubycop/analyzer/ruby/if.rb', line 19

def initialize(expression, statements)
  @expression = expression
  super(statements)
end

Instance Attribute Details

#expressionObject (readonly)

Returns the value of attribute expression.



23
24
25
# File 'lib/rubycop/analyzer/ruby/if.rb', line 23

def expression
  @expression
end