Class: DoubleEntry::BalanceCalculator::RelationBuilder Private
- Inherits:
-
Object
- Object
- DoubleEntry::BalanceCalculator::RelationBuilder
- Defined in:
- lib/double_entry/balance_calculator.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #options ⇒ Object readonly private
Instance Method Summary collapse
- #build ⇒ Object private
-
#initialize(options) ⇒ RelationBuilder
constructor
private
A new instance of RelationBuilder.
Constructor Details
#initialize(options) ⇒ RelationBuilder
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of RelationBuilder.
84 85 86 |
# File 'lib/double_entry/balance_calculator.rb', line 84 def initialize() @options = end |
Instance Attribute Details
#options ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
81 82 83 |
# File 'lib/double_entry/balance_calculator.rb', line 81 def @options end |
Instance Method Details
#build ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
88 89 90 91 92 93 94 95 |
# File 'lib/double_entry/balance_calculator.rb', line 88 def build lines = Line.where(:account => account) lines = lines.where('created_at <= ?', at) if at? lines = lines.where(:created_at => from..to) if between? lines = lines.where(:code => codes) if code? lines = lines.where(:scope => scope) if scope? lines end |