Sha256: 87e58a0eacf602f46fa6cf507254d36ca494094681b980195bfc4a13273dc49c

Contents?: true

Size: 805 Bytes

Versions: 2

Compression:

Stored size: 805 Bytes

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  module Models
    # @author VAILLANT Jeremy <jeremy.vaillant@dazzl.tv>
    #
    # Store instance information for MongoID database
    class JanusInstance
      include Mongoid::Document
      include RubyRabbitmqJanus::Models::JanusInstanceCallbacks
      include RubyRabbitmqJanus::Models::JanusInstanceMethods
      include RubyRabbitmqJanus::Models::JanusInstanceValidations

      field :instance, type: Integer
      field :session, type: Integer
      field :enable, type: Boolean
      field :thread, type: Integer

      set_callback(:create,     :after)   { callback_create_after }
      set_callback(:update,     :after)   { callback_update_after }
      set_callback(:destroy,    :after)   { callback_destroy_after }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-2.2.0.pre.159 lib/rrj/models/mongoid.rb
ruby_rabbitmq_janus-2.2.0.pre.42 lib/rrj/models/mongoid.rb