Module: Rack

Defined in:
lib/rackables/more/env_inquirer.rb

Overview

This file not required by default – to add this feature, you need to explicitly require, ex:

require 'rackables/more/env_inquirer'

Defined Under Namespace

Modules: Utils

Class Method Summary collapse

Class Method Details

.envObject

Adds pretty reader and query methods for ENV value. A copy of Rails’ Rails.env for Rack apps.

Examples:

Rack.env                # => "development"
Rack.env.development?   # => true


12
13
14
# File 'lib/rackables/more/env_inquirer.rb', line 12

def self.env
  @env ||= Utils::StringInquirer.new(ENV["RACK_ENV"] || "development")
end