Sha256: f3fc611d3c5d4783b62adddf036f1a18002705674a49f466c64f8ee5882afebe

Contents?: true

Size: 533 Bytes

Versions: 14

Compression:

Stored size: 533 Bytes

Contents

# frozen_string_literal: true
require 'active_support'

module ActiveEncode
  module Status
    extend ActiveSupport::Concern

    included do
      # Current state of the encoding process
      attr_accessor :state
      attr_accessor :errors

      attr_accessor :created_at
      attr_accessor :updated_at
    end

    def cancelled?
      state == :cancelled
    end

    def completed?
      state == :completed
    end

    def running?
      state == :running
    end

    def failed?
      state == :failed
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
active_encode-1.2.3 lib/active_encode/status.rb
active_encode-1.2.2 lib/active_encode/status.rb
active_encode-1.2.1 lib/active_encode/status.rb
active_encode-1.2.0 lib/active_encode/status.rb
active_encode-1.1.3 lib/active_encode/status.rb
active_encode-1.1.2 lib/active_encode/status.rb
active_encode-1.1.1 lib/active_encode/status.rb
active_encode-1.1.0 lib/active_encode/status.rb
active_encode-1.0.0 lib/active_encode/status.rb
active_encode-0.8.2 lib/active_encode/status.rb
active_encode-0.8.1 lib/active_encode/status.rb
active_encode-0.8.0 lib/active_encode/status.rb
active_encode-0.7.0 lib/active_encode/status.rb
active_encode-0.6.0 lib/active_encode/status.rb