Sha256: 1c41333b222c24a0b3e41068018871f8ee872b9aeb16b97e4cefb3fdd84e8080

Contents?: true

Size: 476 Bytes

Versions: 1

Compression:

Stored size: 476 Bytes

Contents


module Antrapol
  module ToolRack
    module MixinHelper

      module ClassMethods
        def mixin(cls)
          self.class_eval "include #{cls}"
        end

        def class_method(&block)
          class_eval <<-END
          module ClassMethods
          end
          END
          ClassMethods.class_eval(&block)
        end
      end # module ClassMethods

      def self.included(klass)
        klass.extend(ClassMethods)
      end
      
    end    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
toolrack-0.12.0 lib/toolrack/mixin_helper.rb