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.


285
286
287
# File 'lib/feature.rb', line 285

def initialize(params)
  @params = params
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.


283
284
285
# File 'lib/feature.rb', line 283

def params
  @params
end

Instance Method Details

#gate_specified?Boolean

Returns:

  • (Boolean)

289
290
291
# File 'lib/feature.rb', line 289

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

#targetsObject


293
294
295
# File 'lib/feature.rb', line 293

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