Sha256: c31c58a1545cd132f885395e9540a0400fd1f9f2a6fba088dac6be3840d6b183

Contents?: true

Size: 680 Bytes

Versions: 19

Compression:

Stored size: 680 Bytes

Contents

require File.join %w(admin_it data data_behavior)
require File.join %w(admin_it data object)
require File.join %w(admin_it data hash)

#
module AdminIt
  def self.register_data(entity_class, mod)
    return if entity_class.nil?
    @data_modules ||= []
    @data_modules.unshift [entity_class, mod]
  end

  def self.data_module(entity_class)
    return nil if entity_class.nil?
    @data_modules ||= []
    @data_modules.each do |mod|
      return mod[1] if entity_class <= mod[0]
    end
  end

  register_data Object, AdminIt::ObjectData
  register_data Hash, AdminIt::HashData
end

require File.join %w(admin_it data active_record)
require File.join %w(admin_it data mongoid)

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
admin_it-1.3.8 lib/admin_it/data.rb
admin_it-1.3.7 lib/admin_it/data.rb
admin_it-1.3.6 lib/admin_it/data.rb
admin_it-1.3.5 lib/admin_it/data.rb
admin_it-1.3.4 lib/admin_it/data.rb
admin_it-1.3.3 lib/admin_it/data.rb
admin_it-1.3.2 lib/admin_it/data.rb
admin_it-1.3.1 lib/admin_it/data.rb
admin_it-1.3.0 lib/admin_it/data.rb
admin_it-1.2.8 lib/admin_it/data.rb
admin_it-1.2.7 lib/admin_it/data.rb
admin_it-1.2.6 lib/admin_it/data.rb
admin_it-1.2.5 lib/admin_it/data.rb
admin_it-1.2.4 lib/admin_it/data.rb
admin_it-1.2.3 lib/admin_it/data.rb
admin_it-1.2.2 lib/admin_it/data.rb
admin_it-1.2.1 lib/admin_it/data.rb
admin_it-1.2.0 lib/admin_it/data.rb
admin_it-1.1.0 lib/admin_it/data.rb