Exception: Bitstamp::Exception::InvalidContent

Inherits:
StandardError
  • Object
show all
Defined in:
lib/bitstamp/exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_body) ⇒ InvalidContent

Returns a new instance of InvalidContent.


16
17
18
# File 'lib/bitstamp/exception.rb', line 16

def initialize(raw_body)
  @raw_body = raw_body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body


14
15
16
# File 'lib/bitstamp/exception.rb', line 14

def body
  @body
end

Instance Method Details

#inspectObject


24
25
26
# File 'lib/bitstamp/exception.rb', line 24

def inspect
  "#{self.class.name}: #{message}"
end

#messageObject Also known as: to_s


20
21
22
# File 'lib/bitstamp/exception.rb', line 20

def message
  "Failed to parse body as 'json': '#{@raw_body}'"
end