Sha256: d82a7a49b14b9edaedfbbe279752facfa70622d0b842ea37b8e01dcad9e2e9aa

Contents?: true

Size: 544 Bytes

Versions: 35

Compression:

Stored size: 544 Bytes

Contents

require 'active_support/json'
require 'securerandom'

module Runcible
  module Models
    class Distributor
      attr_accessor 'auto_publish', 'id'

      def initialize(params = {})
        @auto_publish = false
        self.id = params[:id] || SecureRandom.hex(10)
        params.each { |k, v| send("#{k}=", v) }
      end

      # Distributor Type id
      #
      # @return [string]
      def type_id
        self.class.type_id
      end

      def self.type_id
        fail NotImplementedError('self.type_id')
      end
    end
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
runcible-2.0.0 lib/runcible/models/distributor.rb
runcible-1.11.0 lib/runcible/models/distributor.rb
runcible-1.10.0 lib/runcible/models/distributor.rb
runcible-1.9.3 lib/runcible/models/distributor.rb
runcible-1.9.2 lib/runcible/models/distributor.rb
runcible-1.9.1 lib/runcible/models/distributor.rb
runcible-1.9.0 lib/runcible/models/distributor.rb
runcible-1.8.0 lib/runcible/models/distributor.rb
runcible-1.7.2 lib/runcible/models/distributor.rb
runcible-1.7.1 lib/runcible/models/distributor.rb
runcible-1.7.0 lib/runcible/models/distributor.rb
runcible-1.6.0 lib/runcible/models/distributor.rb
runcible-1.5.1 lib/runcible/models/distributor.rb
runcible-1.5.0 lib/runcible/models/distributor.rb
runcible-1.4.0 lib/runcible/models/distributor.rb