Class: MoneyTracking::Cli::CreateCommand

Inherits:
Struct
  • Object
show all
Defined in:
lib/money_tracking/cli/create_command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#amountObject

Returns the value of attribute amount

Returns:

  • (Object)

    the current value of amount



3
4
5
# File 'lib/money_tracking/cli/create_command.rb', line 3

def amount
  @amount
end

#currencyObject

Returns the value of attribute currency

Returns:

  • (Object)

    the current value of currency



3
4
5
# File 'lib/money_tracking/cli/create_command.rb', line 3

def currency
  @currency
end

#expense_factoryObject

Returns the value of attribute expense_factory

Returns:

  • (Object)

    the current value of expense_factory



3
4
5
# File 'lib/money_tracking/cli/create_command.rb', line 3

def expense_factory
  @expense_factory
end

#tagsObject

Returns the value of attribute tags

Returns:

  • (Object)

    the current value of tags



3
4
5
# File 'lib/money_tracking/cli/create_command.rb', line 3

def tags
  @tags
end

Instance Method Details

#callObject



4
5
6
7
8
# File 'lib/money_tracking/cli/create_command.rb', line 4

def call
  expense_factory
    .create(raw_expense)
    .build_view(Views::ExpenseCreated)
end