Class: DoubleEntry::Account

Inherits:
Object
  • Object
show all
Defined in:
lib/double_entry/account.rb

Defined Under Namespace

Classes: Instance, Set

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#identifierObject

Returns the value of attribute identifier.



72
73
74
# File 'lib/double_entry/account.rb', line 72

def identifier
  @identifier
end

#positive_onlyObject

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_identifierObject

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

Returns:

  • (Boolean)


78
79
80
# File 'lib/double_entry/account.rb', line 78

def scoped?
  !!scope_identifier
end