Sha256: 7ce50d64408fd43b286d45337c3d54a042ced8190884ff5a793c19197faaf0ef

Contents?: true

Size: 591 Bytes

Versions: 22

Compression:

Stored size: 591 Bytes

Contents

require 'bbk/app/matchers/headers'
require 'bbk/app/matchers/payload'
require 'bbk/app/matchers/delivery_info'
require 'bbk/app/matchers/full'

module BBK
  module App
    module Matchers

      def self.create(type, *args)
        case type
        when :meta, :headers
          Headers.new(args.first)
        when :payload
          Payload.new(args.first)
        when :delivery, :delivery_info
          DeliveryInfo.new(args.first)
        when :full
          Full.new(*args)
        else
          raise "there is no such matcher: #{type}"
        end
      end

    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
bbk-app-1.1.1.273627 lib/bbk/app/matchers.rb
bbk-app-1.1.1.273338 lib/bbk/app/matchers.rb
bbk-app-1.1.1.273312 lib/bbk/app/matchers.rb
bbk-app-1.1.1.273294 lib/bbk/app/matchers.rb
bbk-app-1.1.0.219406 lib/bbk/app/matchers.rb
bbk-app-1.1.0.216998 lib/bbk/app/matchers.rb
bbk-app-1.1.0.204569 lib/bbk/app/matchers.rb
bbk-app-1.1.0.200751 lib/bbk/app/matchers.rb
bbk-app-1.1.0.200186 lib/bbk/app/matchers.rb
bbk-app-1.1.0.199675 lib/bbk/app/matchers.rb
bbk-app-1.1.0.199604 lib/bbk/app/matchers.rb
bbk-app-1.1.0.199389 lib/bbk/app/matchers.rb
bbk-app-1.1.0.199383 lib/bbk/app/matchers.rb
bbk-app-1.0.0.152254 lib/bbk/app/matchers.rb
bbk-app-1.0.0.141716 lib/bbk/app/matchers.rb
bbk-app-1.0.0.80957 lib/bbk/app/matchers.rb
bbk-app-1.0.0.79514 lib/bbk/app/matchers.rb
bbk-app-1.0.0.79241 lib/bbk/app/matchers.rb
bbk-app-1.0.0.78020 lib/bbk/app/matchers.rb
bbk-app-1.0.0.72920 lib/bbk/app/matchers.rb