module Moguro::Decorator

Provide contract programming feature to the class that included this module. Validates the arguments to the method, and validates the return value of the method. And you arbitrary test possible by Assertion library. @since 0.0.1

Constants

CONTRACT_CONTAINER

Public Class Methods

included(klass) click to toggle source
# File lib/moguro/decorator.rb, line 13
def self.included(klass)
  klass.extend(ClassMethods)
  klass.include(Moguro::Types)
  # @todo
  return unless Moguro.enabled?
  require 'test/unit/assertions'
  klass.include(Test::Unit::Assertions)
  klass.extend(Test::Unit::Assertions)
end