Module: Loba::Internal::Platform::WithinRails Private
- Defined in:
- lib/loba/internal/platform/within_rails.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Internal module for considering Rails
Class Method Summary collapse
-
.logger? ⇒ boolean
private
Determines if Rails has its logger defined (generally
true
). -
.production? ⇒ boolean
private
Determines if Rails is running in a production environment.
Class Method Details
.logger? ⇒ boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Determines if Rails has its logger defined (generally true
)
8 9 10 |
# File 'lib/loba/internal/platform/within_rails.rb', line 8 def logger? Internal.boolean_cast(defined?(Rails)) && Internal.boolean_cast(Rails.logger) end |
.production? ⇒ boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Determines if Rails is running in a production environment
15 16 17 |
# File 'lib/loba/internal/platform/within_rails.rb', line 15 def production? Internal.boolean_cast(defined?(Rails)) && Rails.env.production? end |