Class: Fdlint::Parser::JS::IfStatement

Inherits:
Statement show all
Defined in:
lib/fdlint/parser/js/struct.rb

Instance Attribute Summary collapse

Attributes inherited from Element

#left, #right, #type

Instance Method Summary collapse

Methods inherited from Statement

#end_with_semicolon=, #end_with_semicolon?

Methods inherited from Element

#contains?, #position, #text

Constructor Details

#initialize(condition, true_part, false_part, position) ⇒ IfStatement

Returns a new instance of IfStatement.



121
122
123
124
# File 'lib/fdlint/parser/js/struct.rb', line 121

def initialize(condition, true_part, false_part, position)
  super 'if', condition, true_part, position
  @false_part = false_part
end

Instance Attribute Details

#false_partObject (readonly)

Returns the value of attribute false_part.



117
118
119
# File 'lib/fdlint/parser/js/struct.rb', line 117

def false_part
  @false_part
end