Sha256: 3b1cbbde04875d93cf2b42bf4b02728234bb134cac0e1a9ea70cb8e3e472cb40

Contents?: true

Size: 447 Bytes

Versions: 7

Compression:

Stored size: 447 Bytes

Contents

module <%= config[:gem_class] %>
  module ActiveRecord
    def self.included base
      base.extend ClassMethods
    end

    module ClassMethods
      def acts_as_<%= config[:gem_name] %> options = {}
        self.send :include, InstanceMethods

        # Default Options
        class_inheritable_reader :<%= config[:gem_name] %>_options
        write_inheritable_attribute :<%= config[:gem_name] %>_options, options
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gemsmith-3.2.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt
gemsmith-3.1.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt
gemsmith-3.0.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt
gemsmith-2.4.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt
gemsmith-2.3.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt
gemsmith-2.2.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt
gemsmith-2.1.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%/active_record/class_methods.rb.tt