Module: SinatraHelpers::EnvironmentTests

Defined in:
lib/sinatra_helpers/environment_tests.rb

Instance Method Summary collapse

Instance Method Details

#development?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/sinatra_helpers/environment_tests.rb', line 9

def development?
  Sinatra::Application.environment.to_s == 'development'
end

#production?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/sinatra_helpers/environment_tests.rb', line 6

def production? 
  Sinatra::Application.environment.to_s == 'production'
end