Class: TransactionFaker::Account
- Inherits:
-
Object
- Object
- TransactionFaker::Account
- Defined in:
- lib/transaction_faker/models/account.rb
Instance Attribute Summary collapse
-
#balance ⇒ Object
Returns the value of attribute balance.
-
#id ⇒ Object
Returns the value of attribute id.
-
#institution_type ⇒ Object
Returns the value of attribute institution_type.
-
#item ⇒ Object
Returns the value of attribute item.
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #==(other_account) ⇒ Object
-
#initialize(available_balance, current_balance) ⇒ Account
constructor
A new instance of Account.
Constructor Details
#initialize(available_balance, current_balance) ⇒ Account
Returns a new instance of Account.
6 7 8 9 10 11 12 13 14 |
# File 'lib/transaction_faker/models/account.rb', line 6 def initialize(available_balance, current_balance) @id = Faker::Lorem.characters(37) @item = Faker::Lorem.characters(37) @user = Faker::Lorem.characters(37) @institution_type = get_random_institution @balance = get_balance(available_balance, current_balance) @meta = @type = "depository" end |
Instance Attribute Details
#balance ⇒ Object
Returns the value of attribute balance.
4 5 6 |
# File 'lib/transaction_faker/models/account.rb', line 4 def balance @balance end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/transaction_faker/models/account.rb', line 4 def id @id end |
#institution_type ⇒ Object
Returns the value of attribute institution_type.
4 5 6 |
# File 'lib/transaction_faker/models/account.rb', line 4 def institution_type @institution_type end |
#item ⇒ Object
Returns the value of attribute item.
4 5 6 |
# File 'lib/transaction_faker/models/account.rb', line 4 def item @item end |
#meta ⇒ Object
Returns the value of attribute meta.
4 5 6 |
# File 'lib/transaction_faker/models/account.rb', line 4 def @meta end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/transaction_faker/models/account.rb', line 4 def type @type end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/transaction_faker/models/account.rb', line 4 def user @user end |
Instance Method Details
#==(other_account) ⇒ Object
16 17 18 |
# File 'lib/transaction_faker/models/account.rb', line 16 def ==(other_account) @id = other_account.id end |