Sha256: c937861845094a5d49b54678e2c557b93b3c2eb4cad0f89ecd447de334cc2df0

Contents?: true

Size: 585 Bytes

Versions: 20

Compression:

Stored size: 585 Bytes

Contents

module Ddr
  module Models
    module FixityCheckable

      def fixity_checks
        Ddr::Events::FixityCheckEvent.for_object(self)
      end

      # Returns a Ddr::Actions::FixityCheck::Result for the object
      def fixity_check
        Ddr::Actions::FixityCheck.execute(self)
      end

      def last_fixity_check
        fixity_checks.last
      end

      def last_fixity_check_on
        last_fixity_check && last_fixity_check.event_date_time
      end

      def last_fixity_check_outcome
        last_fixity_check && last_fixity_check.outcome
      end

    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
ddr-models-2.11.0 lib/ddr/models/fixity_checkable.rb
ddr-models-2.10.2 lib/ddr/models/fixity_checkable.rb
ddr-models-2.10.1 lib/ddr/models/fixity_checkable.rb
ddr-models-2.10.0 lib/ddr/models/fixity_checkable.rb
ddr-models-2.10.0.rc2 lib/ddr/models/fixity_checkable.rb
ddr-models-2.10.0.rc1 lib/ddr/models/fixity_checkable.rb
ddr-models-2.9.2 lib/ddr/models/fixity_checkable.rb
ddr-models-2.9.1 lib/ddr/models/fixity_checkable.rb
ddr-models-2.9.0 lib/ddr/models/fixity_checkable.rb
ddr-models-2.9.0.rc1 lib/ddr/models/fixity_checkable.rb
ddr-models-2.8.0 lib/ddr/models/fixity_checkable.rb
ddr-models-2.8.0.rc1 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.6 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.5 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.4 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.3 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.2 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.1 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.0 lib/ddr/models/fixity_checkable.rb
ddr-models-2.7.0.rc1 lib/ddr/models/fixity_checkable.rb