Method: Brief.load_commands

Defined in:
lib/brief.rb

.load_commandsObject



43
44
45
46
47
48
49
50
51
52
# File 'lib/brief.rb', line 43

def self.load_commands
  Dir[gem_root.join('brief', 'cli', '**/*.rb')].each { |f| require(f) }

  # the instance methods which get defined with the helper
  Brief::Model.classes.each do |klass|
    Array(klass.defined_actions).uniq.each do |action|
      Brief::Util.create_method_dispatcher_command_for(action, klass)
    end
  end
end