Class: Feature::Target

Inherits:
Object
  • Object
show all
Defined in:
lib/feature.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Target

Returns a new instance of Target.


198
199
200
# File 'lib/feature.rb', line 198

def initialize(params)
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params


196
197
198
# File 'lib/feature.rb', line 196

def params
  @params
end

Instance Method Details

#gate_specified?Boolean

Returns:

  • (Boolean)

202
203
204
# File 'lib/feature.rb', line 202

def gate_specified?
  %i(user project group feature_group).any? { |key| params.key?(key) }
end

#targetsObject


206
207
208
# File 'lib/feature.rb', line 206

def targets
  [feature_group, user, project, group].compact
end