Class: AdLint::Cpp::UndefLine

Inherits:
ControlLine show all
Defined in:
lib/adlint/cpp/syntax.rb

Instance Attribute Summary collapse

Attributes inherited from ControlLine

#keyword

Instance Method Summary collapse

Methods inherited from ControlLine

#location

Methods inherited from SyntaxNode

#location, #short_class_name

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

#initialize(keyword, id) ⇒ UndefLine

Returns a new instance of UndefLine.



418
419
420
421
# File 'lib/adlint/cpp/syntax.rb', line 418

def initialize(keyword, id)
  super(keyword)
  @identifier = id
end

Instance Attribute Details

#identifierObject (readonly)

Returns the value of attribute identifier.



423
424
425
# File 'lib/adlint/cpp/syntax.rb', line 423

def identifier
  @identifier
end

Instance Method Details

#inspect(indent = 0) ⇒ Object



425
426
427
# File 'lib/adlint/cpp/syntax.rb', line 425

def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{@identifier.inspect})"
end