Class: Ecrire::Commands::Server
- Defined in:
- lib/ecrire/commands/server.rb
Instance Method Summary collapse
-
#initialize(options = {}, *args) ⇒ Server
constructor
A new instance of Server.
- #run! ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(options = {}, *args) ⇒ Server
Returns a new instance of Server.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/ecrire/commands/server.rb', line 7 def initialize( = {}, *args) require 'ecrire' require 'rails/commands/server' shift_argv! @server = Rails::Server.new @server.[:Port] = [:Port] end |
Instance Method Details
#run! ⇒ Object
18 19 20 21 22 23 |
# File 'lib/ecrire/commands/server.rb', line 18 def run! @server.tap do |server| Dir.chdir(Ecrire::Application.root) server.start end end |