Class: ReactRailsAPI::CLI
- Inherits:
-
Thor
- Object
- Thor
- ReactRailsAPI::CLI
- Defined in:
- lib/react-rails-api/cli.rb
Constant Summary collapse
- TEMPLATE =
File.join __dir__, 'template.rb'
Instance Method Summary collapse
Instance Method Details
#new(path) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/react-rails-api/cli.rb', line 9 def new(path) opts = opts << '--database=postgresql' if [:database] opts << '--skip-active-record' if ![:database] opts << "--template=#{TEMPLATE}" exec "rails new #{path} #{opts.join ' '}" end |
#version ⇒ Object
19 20 21 |
# File 'lib/react-rails-api/cli.rb', line 19 def version puts ReactRailsAPI::VERSION end |