Sha256: 9a3084ada160e450b5b2ed6ed2c52780f6680ba00db4bc1db7832b8ce1b4d960

Contents?: true

Size: 946 Bytes

Versions: 7

Compression:

Stored size: 946 Bytes

Contents

require "<%= config[:gem_name] %>/version"

<%- if config[:rails] -%>
# Rails Enhancements
if defined? Rails
  # Dependencies
  require "<%= config[:gem_name] %>/active_record/class_methods"
  require "<%= config[:gem_name] %>/active_record/instance_methods"
  require "<%= config[:gem_name] %>/action_view/instance_methods"
  require "<%= config[:gem_name] %>/action_controller/class_methods"
  require "<%= config[:gem_name] %>/action_controller/instance_methods"

  # Model
  if defined? ActiveRecord
    ActiveRecord::Base.send :include, <%= config[:gem_class] %>::ActiveRecord
  end

  # View
  if defined? ActionView
    ActionView::Base.send :include, <%= config[:gem_class] %>::ActionView
  end

  # Controller
  if defined? ActionController
    ActionController::Base.send :include, <%= config[:gem_class] %>::ActionController
  end
end
<%- else -%>
# Namespace
module <%= config[:gem_class] %>
  # TODO - Add code here.
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%.rb.tt
gemsmith-3.1.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt
gemsmith-3.0.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt
gemsmith-2.4.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt
gemsmith-2.3.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt
gemsmith-2.2.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt
gemsmith-2.1.0 lib/gemsmith/templates/%gem_name%/lib/%gem_name%.rb.tt