Class: Bringhurst::TypeObserver
- Inherits:
-
Object
- Object
- Bringhurst::TypeObserver
- Includes:
- Singleton
- Defined in:
- lib/bringhurst/type_observer.rb
Instance Attribute Summary collapse
-
#method_calls ⇒ Object
readonly
Returns the value of attribute method_calls.
Instance Method Summary collapse
-
#initialize ⇒ TypeObserver
constructor
A new instance of TypeObserver.
- #observe_class(klass) ⇒ Object
- #register_call(signature) ⇒ Object
Constructor Details
#initialize ⇒ TypeObserver
Returns a new instance of TypeObserver.
11 12 13 |
# File 'lib/bringhurst/type_observer.rb', line 11 def initialize @method_calls = [] end |
Instance Attribute Details
#method_calls ⇒ Object (readonly)
Returns the value of attribute method_calls.
9 10 11 |
# File 'lib/bringhurst/type_observer.rb', line 9 def method_calls @method_calls end |
Instance Method Details
#observe_class(klass) ⇒ Object
15 16 17 18 |
# File 'lib/bringhurst/type_observer.rb', line 15 def observe_class(klass) wrap_instance_methods_of(klass) wrap_class_methods_of(klass) end |
#register_call(signature) ⇒ Object
20 21 22 |
# File 'lib/bringhurst/type_observer.rb', line 20 def register_call(signature) @method_calls << signature end |