Class: ReleaseFeature::FeatureCollection
- Inherits:
-
Hash
- Object
- Hash
- ReleaseFeature::FeatureCollection
- Defined in:
- lib/release_feature/feature_collection.rb
Instance Method Summary collapse
- #combine_features(features) ⇒ ReleaseFeature::FeatureCollection
- #environments ⇒ Array<Symbol>
- #names ⇒ Array<Symbol>
Instance Method Details
#combine_features(features) ⇒ ReleaseFeature::FeatureCollection
7 8 9 10 11 12 13 |
# File 'lib/release_feature/feature_collection.rb', line 7 def combine_features(features) all_names = (names + features.names).uniq all_environments = (environments + features.environments).uniq all_names.each_with_object(ReleaseFeature::FeatureCollection.new).each do |name, memo_obj| memo_obj[name] = build_environments(name, all_environments, features) end end |
#environments ⇒ Array<Symbol>
21 22 23 |
# File 'lib/release_feature/feature_collection.rb', line 21 def environments values.each_with_object([]) { |a, memo| memo.concat(a.keys) }.uniq end |
#names ⇒ Array<Symbol>
16 17 18 |
# File 'lib/release_feature/feature_collection.rb', line 16 def names keys end |