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
librarianp-1.1.2 lib/librarian/config/hash_source.rb
librarianp-1.1.1 lib/librarian/config/hash_source.rb
librarianp-1.1.0 lib/librarian/config/hash_source.rb
librarianp-1.0.0 lib/librarian/config/hash_source.rb
librarianp-0.6.4 lib/librarian/config/hash_source.rb
librarianp-0.6.3 lib/librarian/config/hash_source.rb
librarianp-0.6.2 lib/librarian/config/hash_source.rb
librarianp-0.6.1 lib/librarian/config/hash_source.rb
librarianp-0.6.0 lib/librarian/config/hash_source.rb
librarianp-0.5.1 lib/librarian/config/hash_source.rb
librarianp-0.5.0 lib/librarian/config/hash_source.rb
librarianp-0.4.0 lib/librarian/config/hash_source.rb
librarianp-0.3.0 lib/librarian/config/hash_source.rb
librarianp-0.2.0 lib/librarian/config/hash_source.rb
librarianp-0.1.2 lib/librarian/config/hash_source.rb
librarian-0.1.2 lib/librarian/config/hash_source.rb
librarian-puppet-0.9.10 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-0.1.1 lib/librarian/config/hash_source.rb
librarian-puppet-0.9.9 vendor/librarian/lib/librarian/config/hash_source.rb
librarian-0.1.0 lib/librarian/config/hash_source.rb