Class: Squeegee::Account
Overview
Account
Generic account with validations on specific parameters
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#due_at ⇒ Object
Returns the value of attribute due_at.
-
#name ⇒ Object
Returns the value of attribute name.
-
#number ⇒ Object
Returns the value of attribute number.
-
#paid ⇒ Object
Returns the value of attribute paid.
-
#uid ⇒ Object
Returns the value of attribute uid.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Account
constructor
A new instance of Account.
Methods inherited from Base
Constructor Details
#initialize(args = {}) ⇒ Account
Returns a new instance of Account.
7 8 9 10 11 12 13 14 |
# File 'lib/squeegee/account.rb', line 7 def initialize(args={}) @keys = %w(name uid amount due_at) params(args) args.each do |attribute, value| send(:"#{attribute}=", value) end end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
6 7 8 |
# File 'lib/squeegee/account.rb', line 6 def amount @amount end |
#due_at ⇒ Object
Returns the value of attribute due_at.
6 7 8 |
# File 'lib/squeegee/account.rb', line 6 def due_at @due_at end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/squeegee/account.rb', line 6 def name @name end |
#number ⇒ Object
Returns the value of attribute number.
6 7 8 |
# File 'lib/squeegee/account.rb', line 6 def number @number end |
#paid ⇒ Object
Returns the value of attribute paid.
6 7 8 |
# File 'lib/squeegee/account.rb', line 6 def paid @paid end |
#uid ⇒ Object
Returns the value of attribute uid.
6 7 8 |
# File 'lib/squeegee/account.rb', line 6 def uid @uid end |