Class: ActiveResourceHttpMock::LogSubscriber

Inherits:
ActiveSupport::LogSubscriber
  • Object
show all
Defined in:
lib/active_resource_http_mock/log_subscriber.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.responsesObject



8
9
10
# File 'lib/active_resource_http_mock/log_subscriber.rb', line 8

def self.responses
  events.values
end

Instance Method Details

#request(event) ⇒ Object



12
13
14
15
# File 'lib/active_resource_http_mock/log_subscriber.rb', line 12

def request(event)
  req = compose_event(event)
  events[req[0..1].join('%')] = req
end