Sha256: bc1282a2cc7a205da22614dfb1475848fe2a020254fccb5d14d836c582217bbd
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
require 'eventmachine' require 'http/parser' require 'async_rack' # The Goliath Framework module Goliath module_function @env = :development # Retrieves the current goliath environment # # @return [String] the current environment def env @env end # Sets the current goliath environment # # @param [String] env the environment string of [dev|prod|test] def env=(env) case(env.to_s) when 'dev' then @env = :development when 'prod' then @env = :production when 'test' then @env = :test end end # Determines if we are in the production environment # # @return [Boolean] true if current environemnt is production, false otherwise def prod? @env == :production end # Determines if we are in the development environment # # @return [Boolean] true if current environemnt is development, false otherwise def dev? @env == :development end # Determines if we are in the test environment # # @return [Boolean] true if current environemnt is test, false otherwise def test? @env == :test end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
goliath-0.9.1 | lib/goliath/goliath.rb |