Class: Wool::SexpAnalysis::WoolMethod

Inherits:
Object
  • Object
show all
Extended by:
ModuleExtensions
Defined in:
lib/wool/analysis/wool_class.rb

Overview

Wool representation of a method. This name is tweaked so it doesn’t collide with ::Method.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ModuleExtensions

attr_accessor_with_default, cattr_accessor, cattr_accessor_with_default, cattr_get_and_setter, cattr_reader, cattr_writer

Constructor Details

#initialize(name) {|_self| ... } ⇒ WoolMethod

Returns a new instance of WoolMethod.

Yields:

  • (_self)

Yield Parameters:



36
37
38
39
40
# File 'lib/wool/analysis/wool_class.rb', line 36

def initialize(name)
  @name = name
  @signatures = []
  yield self if block_given?
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



33
34
35
# File 'lib/wool/analysis/wool_class.rb', line 33

def name
  @name
end

#signaturesObject (readonly)

Returns the value of attribute signatures.



33
34
35
# File 'lib/wool/analysis/wool_class.rb', line 33

def signatures
  @signatures
end

Instance Method Details

#add_signature(return_proto, arg_protos) ⇒ Object



42
43
44
# File 'lib/wool/analysis/wool_class.rb', line 42

def add_signature(return_proto, arg_protos)
  @signatures << Signature.new(self.name, return_proto, arg_protos)
end