module Hookers::Command

Public Class Methods

included(base) click to toggle source
# File lib/hookers/command.rb, line 9
def self.included(base)
  Hookers.commands[base.name.gsub(/^Hookers::Commands::/, "").downcase] = base
end

Public Instance Methods

parse_options(args) click to toggle source
# File lib/hookers/command.rb, line 13
def parse_options(args)
  if self.class.respond_to?(:slop)
    slop = self.class.slop
    slop.parse(args)
    slop.to_hash
  end
end