Class: Qif::Transaction::Split::Builder
- Inherits:
-
Object
- Object
- Qif::Transaction::Split::Builder
- Includes:
- Builderable
- Defined in:
- lib/qif/transaction/split/builder.rb
Overview
Factory class for buliding splits. Do not construct this directly, rather use Qif::Transaction::Builder#add_split
Instance Method Summary collapse
- #add_split(split_memo) ⇒ Object
- #build_split ⇒ Object
-
#initialize(transaction_builder) {|_self| ... } ⇒ Builder
constructor
A new instance of Builder.
- #method_missing(name, *args, &block) ⇒ Object
Methods included from Builderable
Constructor Details
#initialize(transaction_builder) {|_self| ... } ⇒ Builder
Returns a new instance of Builder.
11 12 13 14 |
# File 'lib/qif/transaction/split/builder.rb', line 11 def initialize(transaction_builder) @transaction_builder = transaction_builder yield self if block_given? end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
29 30 31 |
# File 'lib/qif/transaction/split/builder.rb', line 29 def method_missing(name, *args, &block) @transaction_builder.send(name, *args, &block) end |
Instance Method Details
#add_split(split_memo) ⇒ Object
16 17 18 |
# File 'lib/qif/transaction/split/builder.rb', line 16 def add_split(split_memo) @transaction_builder.add_split(split_memo) end |
#build_split ⇒ Object
25 26 27 |
# File 'lib/qif/transaction/split/builder.rb', line 25 def build_split _build(Qif::Transaction::Split.new) end |