Sha256: e0df66a57269468c2691688f3ea788c5c06cee16bcdcc79a9ff8bfafeba1996d

Contents?: true

Size: 447 Bytes

Versions: 15

Compression:

Stored size: 447 Bytes

Contents

require 'active_support/core_ext/class/attribute'
require 'active_support/inflector'
require 'enumerate_it/base'
require 'enumerate_it/class_methods'

module EnumerateIt
  def self.extended(receiver)
    receiver.class_attribute :enumerations, instance_writer: false, instance_reader: false
    receiver.enumerations = {}

    receiver.extend ClassMethods
  end
end

ActiveSupport.on_load(:active_record) { ActiveRecord::Base.extend EnumerateIt }

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
enumerate_it-4.0.0 lib/enumerate_it.rb
enumerate_it-3.3.0 lib/enumerate_it.rb
enumerate_it-3.2.4 lib/enumerate_it.rb
enumerate_it-3.2.3 lib/enumerate_it.rb
enumerate_it-3.2.2 lib/enumerate_it.rb
enumerate_it-3.2.1 lib/enumerate_it.rb
enumerate_it-3.2.0 lib/enumerate_it.rb
enumerate_it-3.1.0 lib/enumerate_it.rb
enumerate_it-3.1.0.rc1 lib/enumerate_it.rb
enumerate_it-3.0.0 lib/enumerate_it.rb
enumerate_it-3.0.0.rc1 lib/enumerate_it.rb
enumerate_it-2.0.0 lib/enumerate_it.rb
enumerate_it-1.7.0 lib/enumerate_it.rb
enumerate_it-1.6.1 lib/enumerate_it.rb
enumerate_it-1.6.0 lib/enumerate_it.rb