Class: Sem4rCli::CommandIdeas
- Inherits:
-
OptParseCommand::Command
- Object
- OptParseCommand::Command
- Sem4rCli::CommandIdeas
- Defined in:
- lib/sem4r_cli/commands/cmd_ideas.rb
Overview
idea
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(common_args) ⇒ CommandIdeas
constructor
A new instance of CommandIdeas.
- #parse_and_run(argv) ⇒ Object
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
.command ⇒ Object
35 36 37 |
# File 'lib/sem4r_cli/commands/cmd_ideas.rb', line 35 def self.command "ideas" end |
.description ⇒ Object
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) = OpenStruct.new rest = opt_parser().parse(argv) return false if .exit if rest.length < 1 puts "keyword missing; see help" return false end keyword = rest[1] account = @common_args.account unless account puts "select an account!" return false end _run(account, keyword) end |