Exception: Freebase::Api::MqlReadError

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/freebase/api.rb

Overview

A class for returing errors from the freebase api. For more infomation see the freebase documentation: www.freebase.com/view/help/guid/9202a8c04000641f800000000544e139#mqlreaderrors

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ MqlReadError

Returns a new instance of MqlReadError.



7
8
9
10
# File 'lib/freebase/api.rb', line 7

def initialize(code,message)
  self.code = code
  self.freebase_message = message
end

Instance Attribute Details

#codeObject

Returns the value of attribute code.



6
7
8
# File 'lib/freebase/api.rb', line 6

def code
  @code
end

#freebase_messageObject

Returns the value of attribute freebase_message.



6
7
8
# File 'lib/freebase/api.rb', line 6

def freebase_message
  @freebase_message
end

Instance Method Details

#messageObject



11
12
13
# File 'lib/freebase/api.rb', line 11

def message
  "#{code}: #{freebase_message}"
end