class RickRollout::Feature

Attributes

user[R]

Public Class Methods

new(user) click to toggle source
# File lib/rick_rollout.rb, line 22
def initialize(user)
  @user = user
end

Public Instance Methods

activate_group(*args) click to toggle source
# File lib/rick_rollout.rb, line 30
def activate_group(*args)
  RickRollout.configuration.rollout.activate_group(*args)
end
active?(*args) click to toggle source
# File lib/rick_rollout.rb, line 26
def active?(*args)
  feature_flags_disabled? || RickRollout.configuration.rollout.active?(*args)
end

Private Instance Methods

feature_flags_disabled?() click to toggle source
# File lib/rick_rollout.rb, line 36
def feature_flags_disabled?
  ENV.fetch('FEATURE_FLAGS', '1').to_i.zero?
end