Sha256: f0892740cd497532c8a8ce4436bd27e47c67832faca38b7cb1b1c2fa29501ea2

Contents?: true

Size: 428 Bytes

Versions: 2

Compression:

Stored size: 428 Bytes

Contents

require 'forwardable'

module Cocina
  class Instance
    attr_reader :name, :dependencies
    attr_accessor :runner

    extend Forwardable

    def_delegators :@runner, :destroy, :create, :converge, :verify

    def initialize(name)
      @name = name
      @dependencies = []
    end

    def depends(dep)
      @dependencies << dep
    end

    def has_dependency?
      dependencies.empty? ? false : true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocina-0.1.3 lib/cocina/instance.rb
cocina-0.1.2 lib/cocina/instance.rb