Class: Troo::CLI::Add

Inherits:
ThorFixes show all
Defined in:
lib/troo/cli/add.rb

Instance Method Summary collapse

Methods inherited from ThorFixes

banner

Instance Method Details

#board(name = nil) ⇒ Object



11
12
13
14
# File 'lib/troo/cli/add.rb', line 11

def board(name = nil)
  value = name.nil? ? prompt_for_name : name
  say Commands::Add.dispatch(value, nil, type: :board)
end

#card(id, name = nil) ⇒ Object



22
23
24
25
# File 'lib/troo/cli/add.rb', line 22

def card(id, name = nil)
  value = name.nil? ? prompt_for_name : name
  say Commands::Add.dispatch(value, id, type: :card)
end

#comment(id, comment = nil) ⇒ Object



33
34
35
36
# File 'lib/troo/cli/add.rb', line 33

def comment(id, comment = nil)
  value = comment.nil? ? prompt_for_comment : comment
  say Commands::Add.dispatch(value, id, type: :comment)
end

#list(id, name = nil) ⇒ Object



44
45
46
47
# File 'lib/troo/cli/add.rb', line 44

def list(id, name = nil)
  value = name.nil? ? prompt_for_name : name
  say Commands::Add.dispatch(value, id, type: :list)
end