module Anypow

Constants

VERSION

Public Class Methods

ruby_18?() click to toggle source
# File lib/anypow.rb, line 5
def self.ruby_18?
  defined?(RUBY_VERSION) and RUBY_VERSION =~ /^1\.8\.\d+/
end

Public Instance Methods

is_pow?() click to toggle source
# File lib/anypow.rb, line 24
def is_pow?
  self.class.to_s == "Nack::Builder"
end
run(app) click to toggle source
Calls superclass method
# File lib/anypow.rb, line 9
def run(app)
  if is_pow?
    super(app) if app.class == Anypow::App
  else
    super(app) if app.class != Anypow::App
  end
end
run_pow(command) click to toggle source
# File lib/anypow.rb, line 17
def run_pow(command)
  require 'rack'
  use Rack::Chunked
  use Rack::ContentLength
  run Anypow::App.new(command) if is_pow?
end