Class: EdiParser::Invoice
- Inherits:
-
Object
- Object
- EdiParser::Invoice
- Defined in:
- lib/edi_parser/invoice.rb
Instance Attribute Summary collapse
-
#number ⇒ Integer
The invoice number.
-
#series ⇒ String
The invoice series.
Instance Method Summary collapse
- #==(another) ⇒ Object
-
#initialize(attributes = {}) ⇒ Invoice
constructor
A new instance of Invoice.
Constructor Details
#initialize(attributes = {}) ⇒ Invoice
Returns a new instance of Invoice.
10 11 12 13 14 |
# File 'lib/edi_parser/invoice.rb', line 10 def initialize(attributes = {}) attributes.each do |key, value| __send__("#{key}=", value) end end |
Instance Attribute Details
#number ⇒ Integer
Returns the invoice number.
5 6 7 |
# File 'lib/edi_parser/invoice.rb', line 5 def number @number end |
#series ⇒ String
Returns the invoice series.
8 9 10 |
# File 'lib/edi_parser/invoice.rb', line 8 def series @series end |
Instance Method Details
#==(another) ⇒ Object
16 17 18 19 |
# File 'lib/edi_parser/invoice.rb', line 16 def ==(another) return false unless another.respond_to?(:number) && another.respond_to?(:series) number == another.number && series == another.series end |