Module: Noder

Defined in:
lib/noder.rb,
lib/noder/http.rb,
lib/noder/utils.rb,
lib/noder/events.rb,
lib/noder/version.rb,
lib/noder/http/utils.rb,
lib/noder/http/server.rb,
lib/noder/http/request.rb,
lib/noder/http/response.rb,
lib/noder/http/connection.rb,
lib/noder/events/event_node.rb,
lib/noder/events/event_stack.rb,
lib/noder/events/em_event_node.rb,
lib/noder/events/event_emitter.rb,
lib/noder/events/listeners/base.rb,
lib/noder/http/listeners/request.rb,
lib/noder/http/listeners/response.rb,
lib/noder/http/listeners/not_found.rb

Defined Under Namespace

Modules: Events, HTTP, Utils

Constant Summary collapse

VERSION =
'0.0.2'

Class Method Summary collapse

Class Method Details

.loggerObject



9
10
11
# File 'lib/noder.rb', line 9

def logger
  @logger ||= Logger.new(STDOUT)
end

.logger=(logger) ⇒ Object



13
14
15
# File 'lib/noder.rb', line 13

def logger=(logger)
  @logger = logger
end

.with(operation, callback = nil, &block) ⇒ Object



17
18
19
# File 'lib/noder.rb', line 17

def with(operation, callback=nil, &block)
  EM.defer(operation, callback || block)
end