class Object
Public Instance Methods
request(*args, &block)
click to toggle source
@return [ATD::Route]
# File lib/atd.rb, line 261 def request(*args, &block) ATD::App.request(*args, &block) end
start(app = DefaultApp, server = WEBrick, port = 3150)
click to toggle source
Starts the rack server @param [Class] app The app you would like to start @param [Class] server The server that you would like to use. @param [Fixnum] port The port you would like the server to run on.
# File lib/atd.rb, line 271 def start(app = DefaultApp, server = WEBrick, port = 3150) Rack::Server.start(app: app.new, server: server, Port: port) end
to_compile(name, &block)
click to toggle source
# File lib/atd/routes.rb, line 69 def to_compile(name, &block) warn "You have overriden the #{name.to_sym} compiler" if ATD::Compilation.compilers.key? name.to_sym ATD::Compilation.compilers[name.to_sym] = block end
to_precompile(name, &block)
click to toggle source
# File lib/atd/routes.rb, line 74 def to_precompile(name, &block) warn "You have overriden the #{name.to_sym} precompiler" if ATD::Compilation.compilers.key? name.to_sym ATD::Compilation.precompilers[name.to_sym] = block end