Class: AdLint::Cpp::ElifGroups
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods inherited from SyntaxNode
#location, #short_class_name
#analysis_target?
Methods included from Visitable
#accept
Constructor Details
216
217
218
219
|
# File 'lib/adlint/cpp/syntax.rb', line 216
def initialize
super
@elif_statements = []
end
|
Instance Attribute Details
#elif_statements ⇒ Object
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
|