module DuckPond::Contract::ConvinienceMethods

Public Instance Methods

has_method(method_name, opts = {}) click to toggle source

has_method

Adds a method clause to the contract

# File lib/duckpond/contract/convinience_methods.rb, line 14
def has_method(method_name, opts = {})
  if block_given?
    has_clause(MethodClause, opts.merge(:method_name => method_name), &Proc.new)
  else
    has_clause(MethodClause, opts.merge(:method_name => method_name))
  end
end