Class: RSpec::Raml::Matchers::MatchRaml

Inherits:
Abstract
  • Object
show all
Defined in:
lib/rspec/raml/matchers/match_raml.rb

Instance Attribute Summary

Attributes inherited from Abstract

#raml, #response, #status, #url, #verb

Instance Method Summary collapse

Methods inherited from Abstract

#initialize, #matches?

Constructor Details

This class inherits a constructor from RSpec::Raml::Matchers::Abstract

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object (private)



33
34
35
36
37
38
39
40
41
42
# File 'lib/rspec/raml/matchers/match_raml.rb', line 33

def method_missing(meth, *args, &block)
  valid = matchers.any? do |matcher|
    if matcher.respond_to?(meth)
      matcher.send(meth, *args, &block)
      true
    end
  end

  valid ? self : super
end

Instance Method Details

#descriptionObject



9
10
11
# File 'lib/rspec/raml/matchers/match_raml.rb', line 9

def description
  'match RAML'
end