Exception: Ya::API::Direct::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ya/api/direct/exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error_detail, error_str, error_code) ⇒ Exception

Returns a new instance of Exception.



7
8
9
10
11
# File 'lib/ya/api/direct/exception.rb', line 7

def initialize(error_detail, error_str, error_code)
  @error_detail = error_detail
  @error_str = error_str
  @error_code = error_code
end

Instance Attribute Details

#error_codeObject (readonly)

Returns the value of attribute error_code.



5
6
7
# File 'lib/ya/api/direct/exception.rb', line 5

def error_code
  @error_code
end

#error_detailObject (readonly)

Returns the value of attribute error_detail.



5
6
7
# File 'lib/ya/api/direct/exception.rb', line 5

def error_detail
  @error_detail
end

#error_strObject (readonly)

Returns the value of attribute error_str.



5
6
7
# File 'lib/ya/api/direct/exception.rb', line 5

def error_str
  @error_str
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/ya/api/direct/exception.rb', line 13

def to_s
  "#{@error_str} : #{@error_detail} : #{@error_code}"
end