Class: Sem4rCli::CommandIdeas

Inherits:
OptParseCommand::Command
  • Object
show all
Defined in:
lib/sem4r_cli/commands/cmd_ideas.rb

Overview

idea

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(common_args) ⇒ CommandIdeas

Returns a new instance of CommandIdeas.



43
44
45
# File 'lib/sem4r_cli/commands/cmd_ideas.rb', line 43

def initialize(common_args)
  @common_args = common_args
end

Class Method Details

.commandObject



35
36
37
# File 'lib/sem4r_cli/commands/cmd_ideas.rb', line 35

def self.command
  "ideas"
end

.descriptionObject



39
40
41
# File 'lib/sem4r_cli/commands/cmd_ideas.rb', line 39

def self.description
  "list ideas"
end

Instance Method Details

#parse_and_run(argv) ⇒ Object



47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/sem4r_cli/commands/cmd_ideas.rb', line 47

def parse_and_run(argv)
  options = OpenStruct.new
  rest    = opt_parser(options).parse(argv)
  return false if options.exit

  if rest.length < 1
    puts "keyword missing; see help"
    return false
  end

  keyword = rest[1]
   = @common_args.
  unless 
    puts "select an account!"
    return false
  end
  _run(, keyword)
end