Module: AccountComponent::Controls::Account
- Defined in:
- lib/account_component/controls/account.rb
Defined Under Namespace
Modules: Balance, Closed, New, Open, Sequence
Class Method Summary
collapse
Class Method Details
.balance ⇒ Object
26
27
28
|
# File 'lib/account_component/controls/account.rb', line 26
def self.balance
Money.example
end
|
.example(balance: nil, sequence: nil) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/account_component/controls/account.rb', line 4
def self.example(balance: nil, sequence: nil)
balance ||= self.balance
account = AccountComponent::Account.build
account.id = id
account.balance = balance
account.opened_time = Time::Effective::Raw.example
account.sequence = sequence unless sequence.nil?
account
end
|
.id ⇒ Object
18
19
20
|
# File 'lib/account_component/controls/account.rb', line 18
def self.id
ID.example(increment: id_increment)
end
|
.id_increment ⇒ Object
22
23
24
|
# File 'lib/account_component/controls/account.rb', line 22
def self.id_increment
11
end
|