Sha256: e4cc3aff2d46718cb0e9c6d8ffa36e79c85788c4565216408660004d934b6eef
Contents?: true
Size: 692 Bytes
Versions: 1
Compression:
Stored size: 692 Bytes
Contents
class Module def concerned_with(*concerns) concerns.each do |concern| require_method "#{name.underscore}/#{concern}" end end def shared_concerns(*concerns) concerns.each do |concern| require_method "shared/#{concern}" end end def include_shared_concerns(*concerns) concerns.each do |concern| require_method "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 protected def require_method path defined?(require_dependency) ? require_dependency(path) : require(path) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sugar-high-0.6.0 | lib/sugar-high/rails/concerns.rb |