Class: OLE_QA::Framework::OLEFS::Invoice_Line_Object
- Inherits:
-
Common_Object
- Object
- Common_Object
- OLE_QA::Framework::OLEFS::Invoice_Line_Object
- Defined in:
- lib/olefs/common/invoice_line_object.rb
Overview
This object is an inheritable base class for all line-type objects on an OLE Financial System Invoice.
-
This class provides a different mechanism for line_id and makes line_number an accessor attribute, allowing for dynamic redefinition of line object elements and sub-elements.
-
Instead of instantiating a new line object for each line and subline, the line_number can be updated in each line and subline object. This allows for slightly deeper recursion without the need of introducing a new level of sub-object below the subline object.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#line_number ⇒ Object
Allow the line_number attribute to be updated for dynamic element definitions.
Attributes inherited from Common_Object
Instance Method Summary collapse
-
#initialize(ole_session, line_number = 1) ⇒ Invoice_Line_Object
constructor
A new instance of Invoice_Line_Object.
-
#line_id ⇒ Object
A reader method for the line_id function.
Methods inherited from Common_Object
Methods included from Helpers
#browser, #load_yml, #set_element, #set_function
Constructor Details
#initialize(ole_session, line_number = 1) ⇒ Invoice_Line_Object
Returns a new instance of Invoice_Line_Object.
27 28 29 30 |
# File 'lib/olefs/common/invoice_line_object.rb', line 27 def initialize(ole_session, line_number = 1) @line_number = line_number super(ole_session) end |
Instance Attribute Details
#line_number ⇒ Object
Allow the line_number attribute to be updated for dynamic element definitions.
25 26 27 |
# File 'lib/olefs/common/invoice_line_object.rb', line 25 def line_number @line_number end |
Instance Method Details
#line_id ⇒ Object
A reader method for the line_id function.
33 34 35 |
# File 'lib/olefs/common/invoice_line_object.rb', line 33 def line_id @line_number - 1 end |