Class: FeatureFlagger::Feature

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

Instance Method Summary collapse

Constructor Details

#initialize(feature_key, resource_name = nil) ⇒ Feature

Returns a new instance of Feature.



3
4
5
6
7
# File 'lib/feature_flagger/feature.rb', line 3

def initialize(feature_key, resource_name = nil)
  @feature_key = resolve_key(feature_key, resource_name)
  @doc = FeatureFlagger.config.info
  fetch_data
end

Instance Method Details

#created_atObject



13
14
15
# File 'lib/feature_flagger/feature.rb', line 13

def created_at
  @data['created_at']
end

#descriptionObject



9
10
11
# File 'lib/feature_flagger/feature.rb', line 9

def description
  @data['description']
end

#full_rollout_untilObject



21
22
23
# File 'lib/feature_flagger/feature.rb', line 21

def full_rollout_until
  @data['full_rollout_until']
end

#keyObject



25
26
27
# File 'lib/feature_flagger/feature.rb', line 25

def key
  @feature_key.join(':')
end

#ownerObject



17
18
19
# File 'lib/feature_flagger/feature.rb', line 17

def owner
  @data['owner']
end