Class: FeatureFlagger::ManifestSources::WithYamlFile
- Inherits:
-
Object
- Object
- FeatureFlagger::ManifestSources::WithYamlFile
- Defined in:
- lib/feature_flagger/manifest_sources/with_yaml_file.rb
Instance Method Summary collapse
-
#initialize(yaml_path = nil) ⇒ WithYamlFile
constructor
A new instance of WithYamlFile.
- #resolved_info ⇒ Object
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_info ⇒ Object
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 |