class Picon::Command
Public Class Methods
new(argv)
click to toggle source
# File lib/picon/command.rb, line 9 def initialize(argv) @argv = argv end
run(argv)
click to toggle source
# File lib/picon/command.rb, line 5 def self.run(argv) new(argv).run end
Public Instance Methods
run()
click to toggle source
# File lib/picon/command.rb, line 13 def run case subcommand when "generate" Generator.run when "version" puts VERSION else abort "Usage: picon {generate|version}" end end
Private Instance Methods
subcommand()
click to toggle source
# File lib/picon/command.rb, line 26 def subcommand @argv[0] end