Class: Vonage::Response
- Inherits:
-
Object
- Object
- Vonage::Response
- Defined in:
- lib/vonage/response.rb
Direct Known Subclasses
Applications::ListResponse, Conversation::Event::ListResponse, Conversation::ListResponse, Conversation::Member::ListResponse, Conversation::User::ConversationsListResponse, Conversation::User::SessionsListResponse, Meetings::DialInNumbers::ListResponse, Meetings::Rooms::ListResponse, Meetings::Sessions::ListResponse, Meetings::Themes::ListResponse, Numbers::ListResponse, Numbers::Response, ProactiveConnect::Events::ListResponse, ProactiveConnect::Items::FileResponse, ProactiveConnect::Items::ListResponse, ProactiveConnect::Lists::ListResponse, Secrets::ListResponse, Subaccounts::BalanceTransfers::ListResponse, Subaccounts::CreditTransfers::ListResponse, Subaccounts::ListResponse, Users::ListResponse, Verify2::TemplateFragments::ListResponse, Verify2::Templates::ListResponse, Video::Archives::ListResponse, Video::Broadcasts::ListResponse, Video::Renders::ListResponse, Video::Streams::ListResponse, Voice::ListResponse
Instance Attribute Summary collapse
-
#entity ⇒ Object
readonly
Returns the value of attribute entity.
-
#http_response ⇒ Object
readonly
Returns the value of attribute http_response.
Instance Method Summary collapse
-
#initialize(entity = nil, http_response = nil) ⇒ Response
constructor
A new instance of Response.
- #method_missing(name, *args) ⇒ Object
- #respond_to_missing?(name, include_private = false) ⇒ Boolean
Constructor Details
#initialize(entity = nil, http_response = nil) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 |
# File 'lib/vonage/response.rb', line 5 def initialize(entity=nil, http_response=nil) @entity = entity @http_response = http_response end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args) ⇒ Object
20 21 22 23 24 |
# File 'lib/vonage/response.rb', line 20 def method_missing(name, *args) return super if @entity.nil? @entity.public_send(name, *args) end |
Instance Attribute Details
#entity ⇒ Object (readonly)
Returns the value of attribute entity.
12 13 14 |
# File 'lib/vonage/response.rb', line 12 def entity @entity end |
#http_response ⇒ Object (readonly)
Returns the value of attribute http_response.
11 12 13 |
# File 'lib/vonage/response.rb', line 11 def http_response @http_response end |
Instance Method Details
#respond_to_missing?(name, include_private = false) ⇒ Boolean
14 15 16 17 18 |
# File 'lib/vonage/response.rb', line 14 def respond_to_missing?(name, include_private = false) return super if @entity.nil? @entity.respond_to?(name) end |