Class: Wowzer::ApplicationResponse
Instance Attribute Summary collapse
Attributes inherited from Resource
#resource
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Resource
all, client, find, #method_missing
Constructor Details
Returns a new instance of ApplicationResponse.
6
7
8
|
# File 'lib/wowzer/application_response.rb', line 6
def initialize(data)
self.data = data
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class Wowzer::Resource
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
4
5
6
|
# File 'lib/wowzer/application_response.rb', line 4
def data
@data
end
|
Class Method Details
.for(application) ⇒ Object
10
11
12
13
|
# File 'lib/wowzer/application_response.rb', line 10
def self.for(application)
data = self.get_data(application)
data.blank? ? nil : new(data)
end
|
Instance Method Details
#iframe_response ⇒ Object
15
16
17
|
# File 'lib/wowzer/application_response.rb', line 15
def iframe_response
data.select{|t| t["name"] == "iframe"}.first
end
|
#iframe_response_url ⇒ Object
23
24
25
|
# File 'lib/wowzer/application_response.rb', line 23
def iframe_response_url
iframe_response["href"] if iframe_response
end
|
#standard_response ⇒ Object
19
20
21
|
# File 'lib/wowzer/application_response.rb', line 19
def standard_response
data.select{|t| t["name"] == "standard"}.first
end
|
#standard_response_url ⇒ Object
27
28
29
|
# File 'lib/wowzer/application_response.rb', line 27
def standard_response_url
standard_response["href"] if standard_response
end
|