Class: TinyRails::Commands::Console
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- TinyRails::Commands::Console
- Includes:
- Thor::Actions, Actions
- Defined in:
- lib/tiny-rails/commands/console.rb
Class Method Summary collapse
-
.source_root ⇒ Object
TODO: Move to a base command.
Instance Method Summary collapse
Methods included from Actions
#addon, #application, #enable_asset_pipeline!, #gem, #initializer, #migration, #route
Class Method Details
.source_root ⇒ Object
TODO: Move to a base command
8 9 10 |
# File 'lib/tiny-rails/commands/console.rb', line 8 def self.source_root "#{File.('../../../../templates', __FILE__)}/" end |
Instance Method Details
#guard_inside_tiny_rails_app ⇒ Object
12 13 14 15 16 17 |
# File 'lib/tiny-rails/commands/console.rb', line 12 def guard_inside_tiny_rails_app unless File.exists?('boot.rb') puts "Can't start console from outside a TinyRails application, please change to a TinyRails application directory first.\n" exit(1) end end |
#start_console ⇒ Object
19 20 21 22 23 |
# File 'lib/tiny-rails/commands/console.rb', line 19 def start_console require './boot.rb' require 'rails/commands/console' Rails::Console.start(TinyRailsApp) end |