Sha256: 3dd897b3e4d0f39e7d6b94e456e849c78e776ce4d5f7d5dd00e5988e8d531e71

Contents?: true

Size: 507 Bytes

Versions: 38

Compression:

Stored size: 507 Bytes

Contents

require 'librarian/lockfile/compiler'
require 'librarian/lockfile/parser'

module Librarian
  class Lockfile

    attr_accessor :environment
    private :environment=
    attr_reader :path

    def initialize(environment, path)
      self.environment = environment
      @path = path
    end

    def save(resolution)
      Compiler.new(environment).compile(resolution)
    end

    def load(string)
      Parser.new(environment).parse(string)
    end

    def read
      load(path.read)
    end

  end
end

Version data entries

38 entries across 38 versions & 5 rubygems

Version Path
librarianp-1.1.2 lib/librarian/lockfile.rb
librarianp-1.1.1 lib/librarian/lockfile.rb
librarianp-1.1.0 lib/librarian/lockfile.rb
librarianp-1.0.0 lib/librarian/lockfile.rb
librarianp-0.6.4 lib/librarian/lockfile.rb
librarianp-0.6.3 lib/librarian/lockfile.rb
librarianp-0.6.2 lib/librarian/lockfile.rb
librarianp-0.6.1 lib/librarian/lockfile.rb
librarianp-0.6.0 lib/librarian/lockfile.rb
librarianp-0.5.1 lib/librarian/lockfile.rb
librarianp-0.5.0 lib/librarian/lockfile.rb
librarianp-0.4.0 lib/librarian/lockfile.rb
librarianp-0.3.0 lib/librarian/lockfile.rb
librarianp-0.2.0 lib/librarian/lockfile.rb
librarianp-0.1.2 lib/librarian/lockfile.rb
librarian-0.1.2 lib/librarian/lockfile.rb
librarian-puppet-0.9.10 vendor/librarian/lib/librarian/lockfile.rb
librarian-0.1.1 lib/librarian/lockfile.rb
librarian-puppet-0.9.9 vendor/librarian/lib/librarian/lockfile.rb
librarian-0.1.0 lib/librarian/lockfile.rb