class Gtmtech::Crypto::CLI
Attributes
subcommands[R]
Public Class Methods
execute()
click to toggle source
# File lib/gtmtech/crypto/CLI.rb, line 32 def self.execute @@command_class.execute end
parse()
click to toggle source
# File lib/gtmtech/crypto/CLI.rb, line 10 def self.parse Utils.require_dir 'gtmtech/crypto/subcommands' @@subcommands = Utils.find_all_subclasses_of({ :parent_class => Gtmtech::Crypto::Subcommands }).collect {|classname| Utils.snakecase classname} subcommand = ARGV.shift subcommand = case subcommand when nil ARGV.delete_if {true} "unknown_command" when /^\-/ ARGV.delete_if {true} "help" else subcommand end @@command_class = Subcommand.find subcommand @@options = @@command_class.parse end
subcommands()
click to toggle source
# File lib/gtmtech/crypto/CLI.rb, line 36 def self.subcommands @@subcommands end