Sha256: f2399c85c136e635f65fb61752e52b60b1316d3ced441464e49b6deca041321c
Contents?: true
Size: 523 Bytes
Versions: 9
Compression:
Stored size: 523 Bytes
Contents
require 'active_support/inflector' class Module def includes *module_names module_names.flatten.each do |name| class_eval %{ include #{name.to_s.camelize} } end end def extends *module_names module_names.flatten.each do |name| class_eval %{ extend #{name.to_s.camelize} } end end def includes_and_extends *module_names includes module_names extends module_names end alias_method :extends_and_includes, :includes_and_extends end
Version data entries
9 entries across 9 versions & 1 rubygems