Sha256: 46e63d2004fbc73b7e3f81c889396065d10655728f7c6cc175c39b23524570e4
Contents?: true
Size: 1.06 KB
Versions: 1
Compression:
Stored size: 1.06 KB
Contents
module Pebbles module LoveLive require 'pebbles/lovelive' require 'thor' class CLI < Thor desc '<MEMBER> [option]', "show the profile of μ's members" long_desc <<-LONGDESC μ's member list: \x5 * honoka \x5 * eli \x5 * kotori \x5 * umi \x5 * rin \x5 * maki \x5 * nozomi \x5 * hanayo \x5 * nico Example: \x5 $ lovelive eli \x5 $ lovelive eli --aa LONGDESC option :aa, type: :boolean, :desc => "show ASCII-Art" def member(name) member = LoveLive.send(name) if member puts member puts member.aa if options[:aa] else puts "Error: unknown member" puts "" invoke :help, ['member'] end end desc 'help [member]', 'show help' def help(command = nil, subcommand = false) super(command, subcommand) end def method_missing(method, *args) invoke :member, [method], args end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pebbles-lovelive-0.0.1 | lib/pebbles/lovelive/cli.rb |