module Renogen::ExtractionStratagies

Methods for extracting release notes

Public Class Methods

add(identifier, klass) click to toggle source

Adds a new stratagy class to store

@param identifier [Symbol] @param klass [Symbol]

# 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={}) click to toggle source

Retrieves a stratagy from a given key

@param stratagy_type [String] identifier for stratagy @param options [Hash] any options required for stratagy @return [ExtractionStratagies::Base]

# File lib/renogen/extraction_stratagies.rb, line 12
def obtain(stratagy_type, options={})
  stratagy = stratagies[stratagy_type.to_s]
  if stratagy
    stratagy.new(options)
  else
    raise Renogen::Exceptions::StratagyNotFound.new(stratagy_type)
  end
end

Private Class Methods

stratagies() click to toggle source
# File lib/renogen/extraction_stratagies.rb, line 32
def stratagies
  @stratagies ||= {}
end