Class: Ifin24::Commands::AddExpense
- Includes:
- Models
- Defined in:
- lib/ifin24/commands/add_expense.rb
Instance Method Summary collapse
Methods inherited from Base
Methods included from Helpers::Printer
Methods included from Helpers::Menu
Constructor Details
This class inherits a constructor from Ifin24::Commands::Base
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/ifin24/commands/add_expense.rb', line 6 def execute entry = get_entry ('Powrót do głównego menu') do || .choice("Nazwa: #{entry.title}") { get_title_for(entry) } .choice("Data: #{entry.date}") { get_date_for(entry) } .choice("Konto: #{entry.account.name}") { get_account_for(entry) } .choice("Kategoria: #{entry.category_full_name}") { get_category_for(entry) } .choice("Kwota: #{entry.amount}") { get_amount_for(entry) } .choice("Tagi: #{entry.}") { (entry) } .choice("Opis: #{entry.note}") { get_note_for(entry) } .choice("Wyślij") do puts "Wysyłanie danych..." @client.send_entry(entry) throw :exit end end end |