Class: Boxing::Command

Inherits:
Rake::Application
  • Object
show all
Defined in:
lib/boxing/command.rb

Overview

The Main Command

Since:

  • 0.1.0

Constant Summary collapse

TASK_ROOT =

Since:

  • 0.11.0

File.expand_path('./tasks', __dir__)

Instance Method Summary collapse

Instance Method Details

#load_rakefileObject

See Also:

  • Rake::Application#load_rakefile

Since:

  • 0.1.0



23
24
25
26
# File 'lib/boxing/command.rb', line 23

def load_rakefile
  glob("#{TASK_ROOT}/**/*.rake").each { |task| add_import task }
  load_imports
end

#run(argv = ARGV) ⇒ Object

See Also:

  • Rake::Application#run

Since:

  • 0.1.0



14
15
16
17
18
19
20
# File 'lib/boxing/command.rb', line 14

def run(argv = ARGV)
  standard_exception_handling do
    init('boxing', argv)
    load_rakefile
    top_level
  end
end