Exception: CzechPostB2bClient::B2BErrors::BaseError

Inherits:
Error
  • Object
show all
Defined in:
lib/czech_post_b2b_client/b2b_errors.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(details = '') ⇒ BaseError

Returns a new instance of BaseError.



38
39
40
41
# File 'lib/czech_post_b2b_client/b2b_errors.rb', line 38

def initialize(details = '')
  super
  self.details = details
end

Class Attribute Details

.codeObject (readonly)

Returns the value of attribute code.



31
32
33
# File 'lib/czech_post_b2b_client/b2b_errors.rb', line 31

def code
  @code
end

.messageObject (readonly)

Returns the value of attribute message.



35
36
37
# File 'lib/czech_post_b2b_client/b2b_errors.rb', line 35

def message
  @message
end

Instance Attribute Details

#detailsObject

Returns the value of attribute details.



43
44
45
# File 'lib/czech_post_b2b_client/b2b_errors.rb', line 43

def details
  @details
end

Instance Method Details

#codeObject



45
46
47
# File 'lib/czech_post_b2b_client/b2b_errors.rb', line 45

def code
  self.class.code
end

#messageObject



49
50
51
# File 'lib/czech_post_b2b_client/b2b_errors.rb', line 49

def message
  "#{self.class.message} -- #{details}"
end