Class: HttpStub::StartServerRakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/http_stub/start_server_rake_task.rb

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ StartServerRakeTask

Returns a new instance of StartServerRakeTask.



8
9
10
11
12
13
14
15
16
# File 'lib/http_stub/start_server_rake_task.rb', line 8

def initialize(options)
  desc "Starts stub #{options[:name]}"
  task "start_#{options[:name]}" do
    HttpStub::Server.instance_eval do
      set :port, options[:port]
      run!
    end
  end
end