Class: AdLint::Cpp::IfndefStatement
- Inherits:
-
IfGroup
- Object
- SyntaxNode
- IfGroup
- AdLint::Cpp::IfndefStatement
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#group ⇒ Object
readonly
Returns the value of attribute group.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
Attributes inherited from IfGroup
Instance Method Summary collapse
-
#initialize(keyword, id, group) ⇒ IfndefStatement
constructor
A new instance of IfndefStatement.
- #inspect(indent = 0) ⇒ Object
Methods inherited from IfGroup
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize(keyword, id, group) ⇒ IfndefStatement
Returns a new instance of IfndefStatement.
200 201 202 203 204 |
# File 'lib/adlint/cpp/syntax.rb', line 200 def initialize(keyword, id, group) super(keyword) @identifier = id @group = group end |
Instance Attribute Details
#group ⇒ Object (readonly)
Returns the value of attribute group.
207 208 209 |
# File 'lib/adlint/cpp/syntax.rb', line 207 def group @group end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
206 207 208 |
# File 'lib/adlint/cpp/syntax.rb', line 206 def identifier @identifier end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
209 210 211 212 |
# File 'lib/adlint/cpp/syntax.rb', line 209 def inspect(indent = 0) [" " * indent + "#{short_class_name} #{@identifier.inspect}", @group ? @group.inspect(indent + 1) : nil].join("\n") end |