Class: Inventory::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/inventory/cli.rb

Instance Method Summary collapse

Instance Method Details

#add(amount, item) ⇒ Object



7
8
9
10
# File 'lib/inventory/cli.rb', line 7

def add(amount, item)
  System::Inventory.add(amount.to_i, item)
  puts System::Inventory.print
end

#invoice(name, *args) ⇒ Object



24
25
26
27
# File 'lib/inventory/cli.rb', line 24

def invoice(name, *args)
  System::Inventory.invoice(name, args)
  puts System::Inventory.print
end

#remove(amount, item) ⇒ Object



13
14
15
16
# File 'lib/inventory/cli.rb', line 13

def remove(amount, item)
  System::Inventory.remove(amount.to_i, item)
  puts System::Inventory.print
end

#showObject



19
20
21
# File 'lib/inventory/cli.rb', line 19

def show
  puts System::Inventory.print
end