class Flipper::FeatureCheckContext
Attributes
feature_name[R]
Public: The name of the feature.
thing[R]
Public: The thing we want to know if a feature is enabled for.
values[R]
Public: The GateValues instance that keeps track of the values for the gates for the feature.
Public Class Methods
new(options = {})
click to toggle source
# File lib/flipper/feature_check_context.rb, line 13 def initialize(options = {}) @feature_name = options.fetch(:feature_name) @values = options.fetch(:values) @thing = options.fetch(:thing) end
Public Instance Methods
actors_value()
click to toggle source
Public: Convenience method for actors value value like Feature has.
# File lib/flipper/feature_check_context.rb, line 25 def actors_value values.actors end
boolean_value()
click to toggle source
Public: Convenience method for boolean value value like Feature has.
# File lib/flipper/feature_check_context.rb, line 30 def boolean_value values.boolean end
groups_value()
click to toggle source
Public: Convenience method for groups value like Feature has.
# File lib/flipper/feature_check_context.rb, line 20 def groups_value values.groups end
percentage_of_actors_value()
click to toggle source
Public: Convenience method for percentage of actors value like Feature has.
# File lib/flipper/feature_check_context.rb, line 35 def percentage_of_actors_value values.percentage_of_actors end
percentage_of_time_value()
click to toggle source
Public: Convenience method for percentage of time value like Feature has.
# File lib/flipper/feature_check_context.rb, line 40 def percentage_of_time_value values.percentage_of_time end