Sha256: 49ca845d7a9f7d8db7cd308ee1515c0a584471d8b4673820302b4df421538a04

Contents?: true

Size: 399 Bytes

Versions: 4

Compression:

Stored size: 399 Bytes

Contents

# auto run
require_relative "nyara/nyara"

END {
  if $!.nil? and !Nyara.config.test?
    Nyara.setup
    Nyara.start_server
  end
}

module Nyara
  class SimpleController < Controller
  end
end

%w[on tag get post put delete patch options meta].each do |m|
  eval <<-RUBY
  def #{m} *xs, &blk
    Nyara::SimpleController.#{m} *xs, &blk
  end
  RUBY
end

configure do
  map '/', 'nyara::simple'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
nyara-0.1.pre.0 lib/nyara.rb
nyara-0.0.1.pre.9 lib/nyara.rb
nyara-0.0.1.pre.8 lib/nyara.rb
nyara-0.0.1.pre.6 lib/nyara.rb