Class: Einvoice::Result
- Inherits:
-
Object
- Object
- Einvoice::Result
- Defined in:
- lib/einvoice/result.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
- #data ⇒ Object
- #errors ⇒ Object
-
#initialize(response = nil) ⇒ Result
constructor
A new instance of Result.
- #successful? ⇒ Boolean
Constructor Details
#initialize(response = nil) ⇒ Result
Returns a new instance of Result.
5 6 7 |
# File 'lib/einvoice/result.rb', line 5 def initialize(response = nil) @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
3 4 5 |
# File 'lib/einvoice/result.rb', line 3 def response @response end |
Instance Method Details
#data ⇒ Object
17 18 19 |
# File 'lib/einvoice/result.rb', line 17 def data raise NotImplementedError, 'You must initialize one of Einvoice::Response subclasses then use it.' end |
#errors ⇒ Object
9 10 11 |
# File 'lib/einvoice/result.rb', line 9 def errors raise NotImplementedError, 'You must initialize one of Einvoice::Response subclasses then use it.' end |
#successful? ⇒ Boolean
13 14 15 |
# File 'lib/einvoice/result.rb', line 13 def successful? raise NotImplementedError, 'You must initialize one of Einvoice::Response subclasses then use it.' end |