require_relative 'cmd' module ::Rrjj class Cmds class << self def all zeus('zro', 'ro') zeus('a', 'rails_navigate access') zeus('la', 'rails get_assets') zeus('lc', 'rails get_controllers') zeus('lmo', 'rails get_models') zeus('lm', 'rails get_migrations') zeus('lsc', 'rails get_scaffolds') zro('schema', 'check schema') zro('table', 'check table') zrk('routes', 'routes') all_shortcuts end def zeus(shortcut_name, bash) all_shortcuts << Cmd.new(shortcut_name, "zeus #{bash}") end def zro(shortcut_name, bash) all_shortcuts << Cmd.new(shortcut_name, "zeus ro #{bash}") end def zrk(shortcut_name, bash) all_shortcuts << Cmd.new(shortcut_name, "zeus rake #{bash}") end attr_accessor :all_shortcuts def all_shortcuts @all_shortcuts.flatten! if defined?(@all_shortcuts) and @all_shortcuts.respond_to?(:flatten!) @all_shortcuts.uniq! if defined?(@all_shortcuts) and @all_shortcuts.respond_to?(:uniq!) @all_shortcuts ||= [] end end end end