Sha256: d870d7b0d60c23ca97ab6088ccbf5d1162246fb31561e4a741a221f388084176

Contents?: true

Size: 585 Bytes

Versions: 2

Compression:

Stored size: 585 Bytes

Contents

class << Module
  def concerned_with(*concerns)
    concerns.each do |concern|
      require_dependency "#{name.underscore}/#{concern}"
    end
  end

  def shared_concerns(*concerns)
    concerns.each do |concern|
      require_dependency "shared/#{concern}"
    end
  end

  def include_shared_concerns(*concerns)
    concerns.each do |concern|
      require_dependency "shared/#{concern}"
      self.send :include, concern.to_s.camelize.constantize
    end
  end

  alias_method :shared_concern, :shared_concerns
  alias_method :include_shared_concern, :include_shared_concerns
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sugar-high-0.5.5 lib/sugar-high/rails/concerns.rb
sugar-high-0.5.4 lib/sugar-high/rails/concerns.rb