Class: Namespacer::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/namespacer/cli.rb

Overview

Facade for Namespacer command line interface managed by [Thor](github.com/wycats/thor). This is the main interface to Namespacer that is called by the Namespacer binary ‘bin/Namespacer`. Do not put any logic in here, create a class and delegate instead.

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



46
47
48
# File 'lib/namespacer/cli.rb', line 46

def method_missing(meth, *args)
  help
end

Instance Method Details

#prefixObject



26
27
28
29
30
# File 'lib/namespacer/cli.rb', line 26

def prefix

  Namespacer.prefix(options[:prefix], options[:alt_prefix])

end

#versionObject

Shows the current version of Namespacer.

See Also:



40
41
42
# File 'lib/namespacer/cli.rb', line 40

def version
  puts "Namespacer version #{ ::Namespacer::VERSION }"
end