Class: Sinatra::Twilio::Response

Inherits:
Twilio::Response
  • Object
show all
Defined in:
lib/sinatra/twilio/response.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Response

Returns a new instance of Response.



8
9
10
11
# File 'lib/sinatra/twilio/response.rb', line 8

def initialize(target)
  super(nil)
  self.target = target
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



13
14
15
16
17
# File 'lib/sinatra/twilio/response.rb', line 13

def method_missing(method, *args, &block)
  target.send(method, *args, &block)
rescue NoMethodError
  super(method, *args, &block)
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



6
7
8
# File 'lib/sinatra/twilio/response.rb', line 6

def target
  @target
end

Class Method Details

.allowed_verbsObject



19
20
21
# File 'lib/sinatra/twilio/response.rb', line 19

def self.allowed_verbs
  superclass.allowed_verbs
end