Sha256: a17854d818303900cd997af5516bbad82457391a439119b043d690b1c71d95fe

Contents?: true

Size: 736 Bytes

Versions: 9

Compression:

Stored size: 736 Bytes

Contents

# frozen_string_literal: true

require_relative 'metadata_observerable'

module LittleWeasel
  module Metadata
    # This module provides methods to validate MetadataObservable objects.
    module MetadataObservableValidatable
      # This method validates a single MetadataObserverable object.
      def validate_metadata_observable(metadata_observable)
        unless valid_metadata_observable? metadata_observable
          raise 'Argument metadata_observable is not a ' \
                "Metadata::MetadataObserverable object: #{metadata_observable.class}"
        end
      end

      def valid_metadata_observable?(metadata_observable)
        metadata_observable.is_a? Metadata::MetadataObserverable
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
LittleWeasel-5.0.13 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.12 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.11 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.10 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.9 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.8 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.7 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.6 lib/LittleWeasel/metadata/metadata_observable_validatable.rb
LittleWeasel-5.0.5 lib/LittleWeasel/metadata/metadata_observable_validatable.rb