Class: MoneyTracking::Cli::UpdateCommand

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#add_tagsObject

Returns the value of attribute add_tags

Returns:

  • (Object)

    the current value of add_tags



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

def add_tags
  @add_tags
end

#amountObject

Returns the value of attribute amount

Returns:

  • (Object)

    the current value of amount



3
4
5
# File 'lib/money_tracking/cli/update_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/update_command.rb', line 3

def currency
  @currency
end

#expense_finderObject

Returns the value of attribute expense_finder

Returns:

  • (Object)

    the current value of expense_finder



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

def expense_finder
  @expense_finder
end

#expense_idObject

Returns the value of attribute expense_id

Returns:

  • (Object)

    the current value of expense_id



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

def expense_id
  @expense_id
end

#rm_tagsObject

Returns the value of attribute rm_tags

Returns:

  • (Object)

    the current value of rm_tags



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

def rm_tags
  @rm_tags
end

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
12
# File 'lib/money_tracking/cli/update_command.rb', line 4

def call
  expense
    .update(
      amount: amount,
      currency: currency,
      add_tags: add_tags,
      rm_tags: rm_tags,
    ).build_view(view_factory)
end