Sha256: 545f2dd42c684da115c2afacdde2fadf53cb69a1b59ed83020846dd0c0d614d7

Contents?: true

Size: 386 Bytes

Versions: 2

Compression:

Stored size: 386 Bytes

Contents

require 'rash/shell/pry'
require 'rash/shell/version'

module Rash
  # :no-doc:
  module Shell
    module_function

    def environment
      ENV['RACK_ENV'] || 'development'
    end

    def environment_color
      environment == 'production' ? "\e[38;5;124m" : "\e[38;5;107m"
    end

    def environment_with_color
      "#{environment_color}#{environment}\033[0m"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rash-shell-0.1.1 lib/rash/shell.rb
rash-shell-0.1.0 lib/rash/shell.rb