class HttpStub::Rake::ServerTasks
Public Class Methods
new(args)
click to toggle source
# File lib/http_stub/rake/server_tasks.rb, line 6 def initialize(args) namespace args[:name] do define_start_task(args) end end
Private Instance Methods
define_start_task(args)
click to toggle source
# File lib/http_stub/rake/server_tasks.rb, line 14 def define_start_task(args) raise "configurator must be specified" unless args[:configurator] namespace :start do desc "Start stub #{args[:name]} in the foreground" task(:foreground) { HttpStub::Server.start(args[:configurator]) } end end