Exception: Ya::Direct::Exception

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ya_direct_api/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.



6
7
8
9
10
# File 'lib/ya_direct_api/exception.rb', line 6

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.



4
5
6
# File 'lib/ya_direct_api/exception.rb', line 4

def error_code
  @error_code
end

#error_detailObject (readonly)

Returns the value of attribute error_detail.



4
5
6
# File 'lib/ya_direct_api/exception.rb', line 4

def error_detail
  @error_detail
end

#error_strObject (readonly)

Returns the value of attribute error_str.



4
5
6
# File 'lib/ya_direct_api/exception.rb', line 4

def error_str
  @error_str
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/ya_direct_api/exception.rb', line 12

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