Class: AdLint::Cpp::ElseStatement
- Inherits:
-
ElseGroup
- Object
- SyntaxNode
- ElseGroup
- AdLint::Cpp::ElseStatement
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
Attributes inherited from ElseGroup
Instance Method Summary collapse
-
#initialize(keyword, group) ⇒ ElseStatement
constructor
A new instance of ElseStatement.
- #inspect(indent = 0) ⇒ Object
Methods inherited from ElseGroup
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(keyword, group) ⇒ ElseStatement
Returns a new instance of ElseStatement.
275 276 277 278 |
# File 'lib/adlint/cpp/syntax.rb', line 275 def initialize(keyword, group) super(keyword) @group = group end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
280 281 282 |
# File 'lib/adlint/cpp/syntax.rb', line 280 def group @group end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
282 283 284 285 |
# File 'lib/adlint/cpp/syntax.rb', line 282 def inspect(indent = 0) [" " * indent + short_class_name, @group ? @group.inspect(indent + 1) : nil].compact.join("\n") end |