Class: Wisper::RSpec::EventRecorder
- Inherits:
-
Object
- Object
- Wisper::RSpec::EventRecorder
show all
- Defined in:
- lib/wisper/rspec/matchers.rb
Instance Method Summary
collapse
Constructor Details
Returns a new instance of EventRecorder.
6
7
8
|
# File 'lib/wisper/rspec/matchers.rb', line 6
def initialize
@broadcast_events = []
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method_name, *args, &block) ⇒ Object
14
15
16
|
# File 'lib/wisper/rspec/matchers.rb', line 14
def method_missing(method_name, *args, &block)
@broadcast_events << method_name.to_s
end
|
Instance Method Details
#broadcast?(event_name) ⇒ Boolean
18
19
20
|
# File 'lib/wisper/rspec/matchers.rb', line 18
def broadcast?(event_name)
@broadcast_events.include?(event_name.to_s)
end
|
#respond_to?(method_name) ⇒ Boolean
10
11
12
|
# File 'lib/wisper/rspec/matchers.rb', line 10
def respond_to?(method_name)
true
end
|