class Kozo::Environment
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/kozo/environment.rb, line 5 def initialize super(ENV.fetch("KOZO_ENV", "development")) return if %w(development test production).include?(self) raise InvalidEnvironment, "Unknown environment: #{self}" end
Public Instance Methods
development?()
click to toggle source
# File lib/kozo/environment.rb, line 13 def development? self == "development" end
production?()
click to toggle source
# File lib/kozo/environment.rb, line 21 def production? self == "production" end
test?()
click to toggle source
# File lib/kozo/environment.rb, line 17 def test? self == "test" end