Class: MotionBundler::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/motion-bundler/cli.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object (private)

Raises:

  • (Error)


26
27
28
# File 'lib/motion-bundler/cli.rb', line 26

def method_missing(method, *args)
  raise Error, "Unrecognized command \"#{method}\". Please consult `motion-bundler help`."
end

Instance Method Details

#trace(file) ⇒ Object



13
14
15
16
17
18
19
20
21
22
# File 'lib/motion-bundler/cli.rb', line 13

def trace(file)
  Require.mock_and_trace do
    require file, "APP"
  end
  puts YAML.dump({
    "FILES" => Require.files,
    "FILES_DEPENDENCIES" => Require.files_dependencies,
    "REQUIRES" => Require.requires
  })
end