Class: DoubleEntry::Account
- Inherits:
-
Object
- Object
- DoubleEntry::Account
- Defined in:
- lib/double_entry/account.rb
Defined Under Namespace
Instance Attribute Summary collapse
-
#identifier ⇒ Object
Returns the value of attribute identifier.
-
#positive_only ⇒ Object
Returns the value of attribute positive_only.
-
#scope_identifier ⇒ Object
Returns the value of attribute scope_identifier.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Account
constructor
A new instance of Account.
- #scoped? ⇒ Boolean
Constructor Details
#initialize(attributes) ⇒ Account
Returns a new instance of Account.
74 75 76 |
# File 'lib/double_entry/account.rb', line 74 def initialize(attributes) attributes.each { |name, value| send("#{name}=", value) } end |
Instance Attribute Details
#identifier ⇒ Object
Returns the value of attribute identifier.
72 73 74 |
# File 'lib/double_entry/account.rb', line 72 def identifier @identifier end |
#positive_only ⇒ Object
Returns the value of attribute positive_only.
72 73 74 |
# File 'lib/double_entry/account.rb', line 72 def positive_only @positive_only end |
#scope_identifier ⇒ Object
Returns the value of attribute scope_identifier.
72 73 74 |
# File 'lib/double_entry/account.rb', line 72 def scope_identifier @scope_identifier end |
Instance Method Details
#scoped? ⇒ Boolean
78 79 80 |
# File 'lib/double_entry/account.rb', line 78 def scoped? !!scope_identifier end |