Class: AdLint::FunctionId

Inherits:
Object
  • Object
show all
Defined in:
lib/adlint/code.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, sig_str) ⇒ FunctionId

Returns a new instance of FunctionId.



469
470
471
# File 'lib/adlint/code.rb', line 469

def initialize(name, sig_str)
  @name, @signature = name, sig_str
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



473
474
475
# File 'lib/adlint/code.rb', line 473

def name
  @name
end

#signatureObject (readonly)

Returns the value of attribute signature.



474
475
476
# File 'lib/adlint/code.rb', line 474

def signature
  @signature
end

Class Method Details

.of_ctors_sectionObject



463
464
465
466
467
# File 'lib/adlint/code.rb', line 463

def self.of_ctors_section
  # NOTE: To represent an object referrer of non-function in case of global
  #       function table initialization.
  self.new(nil, nil)
end

Instance Method Details

#named?Boolean

Returns:

  • (Boolean)


476
477
478
# File 'lib/adlint/code.rb', line 476

def named?
  !@name.nil?
end

#to_aObject



480
481
482
# File 'lib/adlint/code.rb', line 480

def to_a
  [@name, @signature]
end