Class: FeatureFlagger::ManifestSources::WithYamlFile

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

Instance Method Summary collapse

Constructor Details

#initialize(yaml_path = nil) ⇒ WithYamlFile

Returns a new instance of WithYamlFile.



4
5
6
7
# File 'lib/feature_flagger/manifest_sources/with_yaml_file.rb', line 4

def initialize(yaml_path = nil)
  @yaml_path = yaml_path
  @yaml_path ||= "#{Rails.root}/config/rollout.yml" if defined?(Rails)
end

Instance Method Details

#resolved_infoObject



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

def resolved_info
  @resolved_info ||= ::YAML.load_file(@yaml_path) if @yaml_path
end