Exception: LibreTranslate::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/libre_translate/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, message) ⇒ Error

Returns a new instance of Error.



5
6
7
8
# File 'lib/libre_translate/error.rb', line 5

def initialize(code, message)
  @code = code
  @message = message
end

Instance Attribute Details

#codeObject (readonly)

Returns the value of attribute code.



3
4
5
# File 'lib/libre_translate/error.rb', line 3

def code
  @code
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/libre_translate/error.rb', line 3

def message
  @message
end

Instance Method Details

#to_sObject



10
11
12
# File 'lib/libre_translate/error.rb', line 10

def to_s
  message
end