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.
90 91 92 |
# File 'lib/double_entry/balance_calculator.rb', line 90 def initialize() = 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.
87 88 89 |
# File 'lib/double_entry/balance_calculator.rb', line 87 def 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.
94 95 96 97 98 99 100 101 |
# File 'lib/double_entry/balance_calculator.rb', line 94 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 |