Class: Wool::SexpAnalysis::WoolMethod
- Inherits:
-
Object
- Object
- Wool::SexpAnalysis::WoolMethod
- 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
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#signatures ⇒ Object
readonly
Returns the value of attribute signatures.
Instance Method Summary collapse
- #add_signature(return_proto, arg_protos) ⇒ Object
-
#initialize(name) {|_self| ... } ⇒ WoolMethod
constructor
A new instance of WoolMethod.
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.
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
33 34 35 |
# File 'lib/wool/analysis/wool_class.rb', line 33 def name @name end |
#signatures ⇒ Object (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 |