Class: Quandl::Command::Presenters::ErrorPresenter
Instance Attribute Summary
#object, #options
Instance Method Summary
collapse
#as_json, #as_stderr, #doc?, #docs?, #errors, #errors_without_spaces, #initialize, #to_csv, #to_format, #to_json, #to_pipes, #to_qdf, #to_stderr, #valid?
Instance Method Details
#as_pipes ⇒ Object
7
8
9
|
# File 'lib/quandl/command/presenters/error_presenter.rb', line 7
def as_pipes
[ status, id, detail, message.gsub(/\n+/, '. ') ]
end
|
#detail ⇒ Object
19
20
21
|
# File 'lib/quandl/command/presenters/error_presenter.rb', line 19
def detail
object.class.to_s
end
|
#id ⇒ Object
15
16
17
|
# File 'lib/quandl/command/presenters/error_presenter.rb', line 15
def id
'Error'
end
|
#message ⇒ Object
23
24
25
|
# File 'lib/quandl/command/presenters/error_presenter.rb', line 23
def message
object.to_s
end
|
#status ⇒ Object
11
12
13
|
# File 'lib/quandl/command/presenters/error_presenter.rb', line 11
def status
Quandl::Client::HTTP_STATUS_CODES[422]
end
|