Class: AdLint::Cpp::ElifGroups
- Inherits:
-
SyntaxNode
- Object
- SyntaxNode
- AdLint::Cpp::ElifGroups
- Defined in:
- lib/adlint/cpp/syntax.rb
Instance Attribute Summary collapse
-
#elif_statements ⇒ Object
readonly
Returns the value of attribute elif_statements.
Instance Method Summary collapse
-
#initialize ⇒ ElifGroups
constructor
A new instance of ElifGroups.
- #inspect(indent = 0) ⇒ Object
- #push(elif_stmt) ⇒ Object
Methods inherited from SyntaxNode
Methods included from LocationHolder
Methods included from Visitable
Constructor Details
#initialize ⇒ ElifGroups
Returns a new instance of ElifGroups.
216 217 218 219 |
# File 'lib/adlint/cpp/syntax.rb', line 216 def initialize super @elif_statements = [] end |
Instance Attribute Details
#elif_statements ⇒ Object (readonly)
Returns the value of attribute elif_statements.
221 222 223 |
# File 'lib/adlint/cpp/syntax.rb', line 221 def elif_statements @elif_statements end |
Instance Method Details
#inspect(indent = 0) ⇒ Object
228 229 230 231 |
# File 'lib/adlint/cpp/syntax.rb', line 228 def inspect(indent = 0) ([" " * indent + short_class_name] + @elif_statements.map { |child| child.inspect(indent + 1) }).join("\n") end |
#push(elif_stmt) ⇒ Object
223 224 225 226 |
# File 'lib/adlint/cpp/syntax.rb', line 223 def push(elif_stmt) @elif_statements.push(elif_stmt) self end |