Sha256: 5b6e8a0737a874f4359e12e19b19b006aad9f16eed3c5410cefc29c32a657c80

Contents?: true

Size: 598 Bytes

Versions: 39

Compression:

Stored size: 598 Bytes

Contents

require "librarian/source"

module Librarian
  module Config
    class HashSource < Source

      attr_accessor :name, :raw
      private :name=, :raw=

      def initialize(adapter_name, options = { })
        super

        self.name = options.delete(:name) or raise ArgumentError, "must provide name"
        self.raw = options.delete(:raw) or raise ArgumentError, "must provide raw"
      end

      def to_s
        name
      end

    private

      def load
        translate_raw_to_config(raw)
      end

      def save(config)
        raise Error, "nonsense!"
      end

    end
  end
end

Version data entries

39 entries across 39 versions & 5 rubygems

Version Path
librarian-0.1.0.beta.1 lib/librarian/config/hash_source.rb
librarian-puppet-lmco-0.9.8.2 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-0.9.8 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-maestrodev-0.9.7.5 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-maestrodev-0.9.7.4 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-maestrodev-0.9.7.3 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-0.0.26 lib/librarian/config/hash_source.rb
librarian-puppet-maestrodev-0.9.7.2 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-maestrodev-0.9.7.1 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-maestrodev-0.9.7 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-0.0.25 lib/librarian/config/hash_source.rb
librarian-puppet-0.9.7 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-0.9.6 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-0.9.5 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-0.9.4 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-0.9.3 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-0.9.2 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-puppet-0.9.2.pre vendor/librarian/lib/librarian/config/hash_source.rb
librarian-0.0.24 lib/librarian/config/hash_source.rb