Class: Esse::CLI::Root
- Inherits:
-
Thor
- Object
- Thor
- Esse::CLI::Root
- Includes:
- Thor::Actions
- Defined in:
- lib/esse/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Root
constructor
A new instance of Root.
- #install ⇒ Object
- #version ⇒ Object
Constructor Details
#initialize ⇒ Root
Returns a new instance of Root.
33 34 35 36 37 38 39 |
# File 'lib/esse/cli.rb', line 33 def initialize(*) super after_initialize load_app_config([:require]) setup_listeners if ![:silent] && Esse.config.cli_event_listeners? end |
Class Method Details
.exit_on_failure? ⇒ Boolean
45 46 47 |
# File 'lib/esse/cli.rb', line 45 def self.exit_on_failure? true end |
.source_root ⇒ Object
41 42 43 |
# File 'lib/esse/cli.rb', line 41 def self.source_root File.('../cli', __FILE__) end |
Instance Method Details
#install ⇒ Object
64 65 66 67 68 69 70 71 72 |
# File 'lib/esse/cli.rb', line 64 def install path = Pathname.new(File.([:path], Dir.pwd)) path = path.dirname unless path.directory? @app_dir = path.basename template( 'templates/config.rb.erb', path.join('config/esse.rb'), ) end |
#version ⇒ Object
58 59 60 |
# File 'lib/esse/cli.rb', line 58 def version Output.('Esse version: %<version>s', version: Esse::VERSION) end |