Class: AdLint::Cpp::ElifStatement
- Inherits:
-
ElifGroup
- Object
- SyntaxNode
- ElifGroup
- AdLint::Cpp::ElifStatement
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#expression ⇒ Object
Returns the value of attribute expression.
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Attributes inherited from ElifGroup
Instance Method Summary collapse
-
#initialize(keyword, expr, group) ⇒ ElifStatement
constructor
A new instance of ElifStatement.
- #inspect(indent = 0) ⇒ Object
Methods inherited from ElifGroup
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(keyword, expr, group) ⇒ ElifStatement
Returns a new instance of ElifStatement.
247 248 249 250 251 |
# File 'lib/adlint/cpp/syntax.rb', line 247 def initialize(keyword, expr, group) super(keyword) @expression = expr @group = group end |
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
253 254 255 |
# File 'lib/adlint/cpp/syntax.rb', line 253 def expression @expression end |
#group ⇒ Object (readonly)
Returns the value of attribute group.
254 255 256 |
# File 'lib/adlint/cpp/syntax.rb', line 254 def group @group end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
256 257 258 259 |
# File 'lib/adlint/cpp/syntax.rb', line 256 def inspect(indent = 0) [" " * indent + "#{short_class_name} #{@expression.inspect}", @group ? @group.inspect(indent + 1) : nil].compact.join("\n") end |