Sha256: e4afb134e26292f2ef252231c09bffe017d538c350269be8af7bf1da7100494d

Contents?: true

Size: 696 Bytes

Versions: 14

Compression:

Stored size: 696 Bytes

Contents

module Roger::Release::Processors
  class Base
    
    def initialize(options = {})
      @options = {}
      @options.update(options) if options
    end
  
    
    def call(release, options = {})
      raise ArgumentError, "Implement in subclass"
    end
  end

  def self.register(name, processor)
    raise ArgumentError, "Another processor has already claimed the name #{name.inspect}" if self.map.has_key?(name)
    raise ArgumentError, "Name must be a symbol" unless name.kind_of?(Symbol)
    self.map[name] = processor
  end

  def self.map
    @_map ||= {}
  end

end

require File.dirname(__FILE__) + "/processors/mockup"
require File.dirname(__FILE__) + "/processors/url_relativizer"

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
roger-1.1.3 lib/roger/release/processors.rb
roger-1.1.2 lib/roger/release/processors.rb
roger-1.1.1 lib/roger/release/processors.rb
roger-1.1.0 lib/roger/release/processors.rb
roger-1.0.1 lib/roger/release/processors.rb
roger-1.0.0 lib/roger/release/processors.rb
roger-0.13.0 lib/roger/release/processors.rb
roger-0.12.5 lib/roger/release/processors.rb
roger-0.12.4 lib/roger/release/processors.rb
roger-0.12.3 lib/roger/release/processors.rb
roger-0.12.2 lib/roger/release/processors.rb
roger-0.12.1 lib/roger/release/processors.rb
roger-0.12.0 lib/roger/release/processors.rb
roger-0.11.0 lib/roger/release/processors.rb