lib/pebbles/lovelive/cli.rb in pebbles-lovelive-0.0.2 vs lib/pebbles/lovelive/cli.rb in pebbles-lovelive-0.1.0

- old
+ new

@@ -27,20 +27,25 @@ option :aa, type: :boolean, :desc => "show ASCII-Art" option :bigaa, type: :boolean, :desc => "show Big ASCII-Art" def member(name) member = LoveLive.send(name) if member - puts member - puts member.aa if options[:aa] - puts member.big_aa if options[:bigaa] + member.print(options[:aa], options[:bigaa]) else puts "Error: unknown member" puts "" invoke :help, ['member'] end end - desc 'help [member]', 'show help' + desc 'story [option]', 'show story' + option :desc, type: :boolean, :desc => "show description" + def story + story = LoveLive.story + story.print(options[:desc]) + end + + desc 'help [COMMAND]', 'show help. COMMAND is "member" or "story".' def help(command = nil, subcommand = false) super(command, subcommand) end def method_missing(method, *args)