Sha256: b54344d1fce3aaf10be0c8175d9e7a0c1d6860ef2164eb63e7a24a19c08b57f5

Contents?: true

Size: 428 Bytes

Versions: 11

Compression:

Stored size: 428 Bytes

Contents

# frozen_string_literal: true

# Parses and provides access to environment variables.
class Environment
  SERVER_ENV = ENV.fetch('SERVER_ENV', 'development').to_sym
  SERVER_PORT = ENV.fetch('SERVER_PORT', 8080)

  def self.server_env
    SERVER_ENV
  end

  def self.development?
    SERVER_ENV == :development
  end

  def self.production?
    SERVER_ENV == :production
  end

  def self.server_port
    SERVER_PORT
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sqlui-0.1.27 app/environment.rb
sqlui-0.1.26 app/environment.rb
sqlui-0.1.25 app/environment.rb
sqlui-0.1.24 app/environment.rb
sqlui-0.1.23 app/environment.rb
sqlui-0.1.22 app/environment.rb
sqlui-0.1.21 app/environment.rb
sqlui-0.1.20 app/environment.rb
sqlui-0.1.19 app/environment.rb
sqlui-0.1.18 app/environment.rb
sqlui-0.1.17 app/environment.rb