Class: FbRails::Mock::Responder

Inherits:
Object
  • Object
show all
Defined in:
lib/fb_rails/mock.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(responses) ⇒ Responder

Returns a new instance of Responder.



12
13
14
# File 'lib/fb_rails/mock.rb', line 12

def initialize(responses)
  @responses = responses
end

Instance Attribute Details

#responsesObject (readonly)

Returns the value of attribute responses.



11
12
13
# File 'lib/fb_rails/mock.rb', line 11

def responses
  @responses
end

Instance Method Details

#add(path, data) ⇒ Object



16
17
18
# File 'lib/fb_rails/mock.rb', line 16

def add(path, data)
  responses[path] = Response.new(data)
end