Sha256: d14ac8954383105f062e9af459f2145221f3f1eda13f880a45b13001604e8039

Contents?: true

Size: 344 Bytes

Versions: 4

Compression:

Stored size: 344 Bytes

Contents

module Warp
  module ModelMatchers
    class Matcher < Warp::Matcher
      attr_reader :model_or_instance

      private

      def model
        if model_or_instance.is_a? Class
          model_or_instance
        else
          model_or_instance.class
        end
      end

      def model_name
        model.name
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
warp-1.2.3 lib/warp/model_matchers/matcher.rb
warp-1.2.2 lib/warp/model_matchers/matcher.rb
warp-1.2.1 lib/warp/model_matchers/matcher.rb
warp-1.2.0 lib/warp/model_matchers/matcher.rb