Class: Bringhurst::TypeObserver

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/bringhurst/type_observer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTypeObserver

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_callsObject (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