class MobilyApiResponse
Attributes
data[RW]
response_status[RW]
status[RW]
Public Class Methods
new(status, response_status)
click to toggle source
# File lib/mobily/mobily_api_response.rb, line 4 def initialize(status, response_status) @status = status @response_status = response_status.downcase @data = {} end
Public Instance Methods
==(other)
click to toggle source
# File lib/mobily/mobily_api_response.rb, line 18 def == other eql?(other) end
add_data(key, value)
click to toggle source
# File lib/mobily/mobily_api_response.rb, line 10 def add_data(key, value) @data.merge!({key => value}) end
eql?(other)
click to toggle source
# File lib/mobily/mobily_api_response.rb, line 22 def eql? other [@status, @response_status, @data].eql?([other.status, other.response_status, other.data]) end
get(key)
click to toggle source
# File lib/mobily/mobily_api_response.rb, line 14 def get(key) @data.has_key?(key) ? @data[key] : nil end