Class: EODData::Client::Result
- Inherits:
-
Object
- Object
- EODData::Client::Result
show all
- Defined in:
- lib/eod_data/client.rb
Overview
Instance Method Summary
collapse
Constructor Details
#initialize(response) ⇒ Result
Returns a new instance of Result.
181
182
183
|
# File 'lib/eod_data/client.rb', line 181
def initialize(response)
@response = response
end
|
Instance Method Details
#data ⇒ Object
185
186
187
|
# File 'lib/eod_data/client.rb', line 185
def data
@response
end
|
#data_value ⇒ Object
189
190
191
|
# File 'lib/eod_data/client.rb', line 189
def data_value
data["@#{__callee__}".to_sym]
end
|
#message ⇒ Object
193
194
195
|
# File 'lib/eod_data/client.rb', line 193
def message
@response[:@message]
end
|
#result ⇒ Object
197
198
199
|
# File 'lib/eod_data/client.rb', line 197
def result
@response ? :success : :failure
end
|
#success? ⇒ Boolean
201
202
203
|
# File 'lib/eod_data/client.rb', line 201
def success?
result == :success
end
|