Sha256: 451ac2fd2a3fffac663554447d3d6d6d93e44bc22cf28d6536ea7ee279cc57a5

Contents?: true

Size: 593 Bytes

Versions: 2

Compression:

Stored size: 593 Bytes

Contents

require 'uri'
require 'rack'

require 'nyny/version'
require 'nyny/primitives'
require 'nyny/request_scope'
require 'nyny/route'
require 'nyny/app'
require 'nyny/router'
require 'nyny/core-ext/runner'
require 'nyny/core-ext/templates'

module NYNY
  class EnvString < String
    [:production, :development, :test].each do |env|
      define_method "#{env}?" do
        self == env.to_s
      end
    end
  end

  def self.root
    Dir.pwd
  end

  def self.env
    @env ||= EnvString.new(ENV['RACK_ENV'] || 'development')
  end

  App.register NYNY::Runner
  App.register NYNY::Templates
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nyny-3.1.0 lib/nyny.rb
nyny-3.0.1 lib/nyny.rb