Class: ReleaseFeature::Repository::YamlRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/release_feature/repository/yaml_repository.rb

Defined Under Namespace

Classes: AccessibleRange

Instance Method Summary collapse

Constructor Details

#initialize(path:) ⇒ YamlRepository

Returns a new instance of YamlRepository.

Parameters:

  • path (String)


17
18
19
# File 'lib/release_feature/repository/yaml_repository.rb', line 17

def initialize(path:)
  @path = path
end

Instance Method Details

#featuresReleaseFeature::FeatureCollection



22
23
24
25
# File 'lib/release_feature/repository/yaml_repository.rb', line 22

def features
  data = YAML.load_file(@path)
  convert_to_feature_collection(data)
end