Class: TransactionFaker::Account

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = get_meta
  @type = "depository"
end

Instance Attribute Details

#balanceObject

Returns the value of attribute balance.



4
5
6
# File 'lib/transaction_faker/models/account.rb', line 4

def balance
  @balance
end

#idObject

Returns the value of attribute id.



4
5
6
# File 'lib/transaction_faker/models/account.rb', line 4

def id
  @id
end

#institution_typeObject

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

#itemObject

Returns the value of attribute item.



4
5
6
# File 'lib/transaction_faker/models/account.rb', line 4

def item
  @item
end

#metaObject

Returns the value of attribute meta.



4
5
6
# File 'lib/transaction_faker/models/account.rb', line 4

def meta
  @meta
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/transaction_faker/models/account.rb', line 4

def type
  @type
end

#userObject

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 ==()
  @id = .id
end