Sha256: 2060c1ccf97e5e5812d2c8121af68a7ae2825a9049e84f2c7363394644494f96

Contents?: true

Size: 407 Bytes

Versions: 9

Compression:

Stored size: 407 Bytes

Contents

module PerfectAudit
  class Document
    extend Dry::Initializer

    STATUSES = %w(
      queued
      failed
      verifying
      verification_complete
      deleting
      deleted
      rejected
    )

    option :pk, as: :id
    option :pages
    option :status, proc(&:downcase)
    option :name

    STATUSES.each do |s|
      define_method "#{s}?" do
        status == s
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
perfect_audit-0.2.3 lib/perfect_audit/api/document.rb
perfect_audit-0.2.2 lib/perfect_audit/api/document.rb
perfect_audit-0.2.1 lib/perfect_audit/api/document.rb
perfect_audit-0.2.0 lib/perfect_audit/api/document.rb
perfect_audit-0.1.5 lib/perfect_audit/api/document.rb
perfect_audit-0.1.4 lib/perfect_audit/api/document.rb
perfect_audit-0.1.3 lib/perfect_audit/api/document.rb
perfect_audit-0.1.2 lib/perfect_audit/api/document.rb
perfect_audit-0.1.1 lib/perfect_audit/api/document.rb