Sha256: 5d0df245aef9616d29524d27394bbe26ecb52d026bb467eb4bdbd9ccfbfd4a60
Contents?: true
Size: 642 Bytes
Versions: 3
Compression:
Stored size: 642 Bytes
Contents
require 'facet/module/by_name' require 'glue/object' require 'glue/attribute' module Glue # Helpers are standard Ruby modules that contain utility # methods. By using the special 'helper' # macro provided by HelperSupport, the utility methods are # included as private methods. module Helpers def self.append_features(base) base.module_eval do def self.helper(*modules) for mod in modules symbols = mod.instance_methods.collect { |m| m.to_sym } self.send(:include, mod) self.send(:private, *symbols) end end end end end end # * George Moschovitis <gm@navel.gr>
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
glue-0.22.0 | lib/glue/helper.rb |
glue-0.21.0 | lib/glue/helper.rb |
glue-0.21.2 | lib/glue/helper.rb |