Module: Renogen::ExtractionStratagies
- Defined in:
- lib/renogen/extraction_stratagies.rb,
lib/renogen/extraction_stratagies/base.rb,
lib/renogen/extraction_stratagies/yaml_file.rb,
lib/renogen/extraction_stratagies/yaml_file/parser.rb,
lib/renogen/extraction_stratagies/yaml_file/reader.rb,
lib/renogen/extraction_stratagies/yaml_file/provider.rb,
lib/renogen/extraction_stratagies/yaml_file/exceptions.rb,
lib/renogen/extraction_stratagies/yaml_file/exceptions/yaml_file_blank.rb
Overview
Methods for extracting release notes
Defined Under Namespace
Modules: YamlFile Classes: Base
Class Method Summary collapse
-
.add(identifier, klass) ⇒ Object
Adds a new stratagy class to store.
-
.obtain(stratagy_type, options = {}) ⇒ ExtractionStratagies::Base
Retrieves a stratagy from a given key.
Class Method Details
.add(identifier, klass) ⇒ Object
Adds a new stratagy class to store
25 26 27 28 |
# File 'lib/renogen/extraction_stratagies.rb', line 25 def add(identifier, klass) # raise 'name taken' unless stratagies[name].nil? stratagies[identifier.to_s]=klass end |
.obtain(stratagy_type, options = {}) ⇒ ExtractionStratagies::Base
Retrieves a stratagy from a given key
12 13 14 15 16 17 18 19 |
# File 'lib/renogen/extraction_stratagies.rb', line 12 def obtain(stratagy_type, ={}) stratagy = stratagies[stratagy_type.to_s] if stratagy stratagy.new() else raise Renogen::Exceptions::StratagyNotFound.new(stratagy_type) end end |