Class: EODData::Client::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/eod_data/client.rb

Overview

:nodoc:

Direct Known Subclasses

LoginResult, QuoteGetResult, QuoteList2Result

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

#dataObject



185
186
187
# File 'lib/eod_data/client.rb', line 185

def data
  @response
end

#data_valueObject



189
190
191
# File 'lib/eod_data/client.rb', line 189

def data_value
  data["@#{__callee__}".to_sym]
end

#messageObject



193
194
195
# File 'lib/eod_data/client.rb', line 193

def message
  @response[:@message]
end

#resultObject



197
198
199
# File 'lib/eod_data/client.rb', line 197

def result
  @response ? :success : :failure
end

#success?Boolean

Returns:

  • (Boolean)


201
202
203
# File 'lib/eod_data/client.rb', line 201

def success?
  result == :success
end