module-interface

Build Status Gem Version

Force to define methods in module/class

Usage

Overview

require 'module/interface'

module Runnable
  def walk; end
  def run; end
end

class Person
  include Runnable
  extend Module::Interface
  interface Runnable do
    def run; end
  end #=> NotImplementedError "shortage methods: [:walk]"
end

Anywhere

require 'module/interface/core_ext'

Requirements

Install

$ gem install module-interface

Link

License

The MIT X11 License
Copyright (c) 2012 Kenichi Kamiya
See MIT-LICENSE for further details.