Sha256: afe197ab365500449ec67ad025264a8a77af7bb312bda3f3647d45f155f6f6b5

Contents?: true

Size: 463 Bytes

Versions: 7

Compression:

Stored size: 463 Bytes

Contents

module <%= config[:gem_class] %>
  module ActionController
    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/action_controller/class_methods.rb.tmp
gemsmith-1.5.0 lib/gemsmith/templates/lib/gem/action_controller/class_methods.rb.tmp
gemsmith-1.4.0 lib/gemsmith/templates/lib/gem/action_controller/class_methods.rb.tmp
gemsmith-1.3.0 lib/gemsmith/templates/lib/gem/action_controller/class_methods.rb.tmp
gemsmith-1.2.0 lib/gemsmith/templates/lib/gem/action_controller/class_methods.rb.tmp
gemsmith-1.1.0 lib/gemsmith/templates/lib/gem/action_controller/class_methods.rb.tmp
gemsmith-1.0.0 lib/gemsmith/templates/lib/gem/action_controller/class_methods.rb.tmp