Class: CreateWalletService
- Inherits:
-
ApplicationService
- Object
- ApplicationService
- CreateWalletService
- Defined in:
- app/services/create_wallet_service.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(user_id) ⇒ CreateWalletService
constructor
A new instance of CreateWalletService.
Constructor Details
#initialize(user_id) ⇒ CreateWalletService
Returns a new instance of CreateWalletService.
4 5 6 |
# File 'app/services/create_wallet_service.rb', line 4 def initialize(user_id) @user_id = user_id end |
Instance Method Details
#call ⇒ Object
9 10 11 12 |
# File 'app/services/create_wallet_service.rb', line 9 def call return if wallet_exists?("user_id", user_id) create_wallet end |