File: method_missing.rb

package info (click to toggle)
ruby-rspec-expectations 2.14.2-1~bpo70%2B1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy-backports
  • size: 920 kB
  • sloc: ruby: 8,202; makefile: 4
file content (12 lines) | stat: -rw-r--r-- 307 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
module RSpec
  module Matchers

    private

    def method_missing(method, *args, &block)
      return Matchers::BuiltIn::BePredicate.new(method, *args, &block) if method.to_s =~ /^be_/
      return Matchers::BuiltIn::Has.new(method, *args, &block) if method.to_s =~ /^have_/
      super
    end
  end
end