Sha256: e4434d7445aa11d74d07f5128c56bc0ea09f92e40fd2828534cd6edaf1394405

Contents?: true

Size: 598 Bytes

Versions: 3

Compression:

Stored size: 598 Bytes

Contents

require 'rack'

require 'nyny/version'
require 'nyny/app'
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

  class PathString < String
    def join other
      File.join(self, other)
    end
  end

  def self.root
    @root ||= PathString.new(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

3 entries across 3 versions & 1 rubygems

Version Path
nyny-3.2.2 lib/nyny.rb
nyny-3.2.1 lib/nyny.rb
nyny-3.2.0 lib/nyny.rb