Exception: Ipiranga::Exception
- Inherits:
-
StandardError
- Object
- StandardError
- Ipiranga::Exception
- Defined in:
- lib/ipiranga/error.rb
Instance Attribute Summary collapse
-
#result ⇒ Object
Returns the value of attribute result.
Instance Method Summary collapse
-
#initialize(error) ⇒ Exception
constructor
A new instance of Exception.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(error) ⇒ Exception
Returns a new instance of Exception.
5 6 7 8 9 10 11 12 |
# File 'lib/ipiranga/error.rb', line 5 def initialize(error) if error.kind_of?(String) super(error) else @result = error super(error["msgErro"]) end end |
Instance Attribute Details
#result ⇒ Object
Returns the value of attribute result.
3 4 5 |
# File 'lib/ipiranga/error.rb', line 3 def result @result end |
Instance Method Details
#inspect ⇒ Object
14 15 16 |
# File 'lib/ipiranga/error.rb', line 14 def inspect "#{}#{" - response: #{result.inspect}" unless result.nil?}" end |
#to_s ⇒ Object
18 19 20 |
# File 'lib/ipiranga/error.rb', line 18 def to_s inspect end |