Sha256: c81b0a84e444729e2a9e56c55470d60526f4f4ee3bd537aaee9bc3584d6f18a1

Contents?: true

Size: 459 Bytes

Versions: 7

Compression:

Stored size: 459 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-2.0.0 lib/gemsmith/templates/lib/gem/active_record/class_methods.rb.tmp
gemsmith-1.5.0 lib/gemsmith/templates/lib/gem/active_record/class_methods.rb.tmp
gemsmith-1.4.0 lib/gemsmith/templates/lib/gem/active_record/class_methods.rb.tmp
gemsmith-1.3.0 lib/gemsmith/templates/lib/gem/active_record/class_methods.rb.tmp
gemsmith-1.2.0 lib/gemsmith/templates/lib/gem/active_record/class_methods.rb.tmp
gemsmith-1.1.0 lib/gemsmith/templates/lib/gem/active_record/class_methods.rb.tmp
gemsmith-1.0.0 lib/gemsmith/templates/lib/gem/active_record/class_methods.rb.tmp