Class: Flipper::Engine
- Inherits:
-
Rails::Engine
- Object
- Rails::Engine
- Flipper::Engine
- Defined in:
- lib/flipper/engine.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.default_strict_value ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/flipper/engine.rb', line 3 def self.default_strict_value value = ENV["FLIPPER_STRICT"] if value.in?(["warn", "raise", "noop"]) value.to_sym elsif value Typecast.to_boolean(value) ? :raise : false elsif Rails.env.production? false else # Warn in development for now. Future versions may default to :raise in development and test Rails.env.development? && :warn end end |
.deprecated_rails_version? ⇒ Boolean
98 99 100 |
# File 'lib/flipper/engine.rb', line 98 def self.deprecated_rails_version? Gem::Version.new(Rails.version) < Gem::Version.new(Flipper::NEXT_REQUIRED_RAILS_VERSION) end |
Instance Method Details
#cloud? ⇒ Boolean
94 95 96 |
# File 'lib/flipper/engine.rb', line 94 def cloud? !!ENV["FLIPPER_CLOUD_TOKEN"] end |