Class: Simplerb::CLI
- Inherits:
-
Thor
- Object
- Thor
- Simplerb::CLI
- Includes:
- Thor::Actions
- Defined in:
- lib/simplerb/cli.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.source_root ⇒ Object
25 26 27 |
# File 'lib/simplerb/cli.rb', line 25 def self.source_root File.(File.join(File.dirname(__FILE__), 'templates')) end |
Instance Method Details
#new(name) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/simplerb/cli.rb', line 9 def new(name) self.destination_root = Pathname.pwd.join(name) = { name: name } directory('views', ) directory('public', ) template('config.ru.tt', ) end |
#server ⇒ Object
20 21 22 23 |
# File 'lib/simplerb/cli.rb', line 20 def server system "rackup -p #{options[:port]} -s #{options[:server]}" rescue Interrupt end |