Class: RSpec::Raml::Matchers::Abstract
- Inherits:
-
Object
- Object
- RSpec::Raml::Matchers::Abstract
- Defined in:
- lib/rspec/raml/matchers/abstract.rb
Direct Known Subclasses
BeRamlContentType, MatchRaml, MatchRamlBody, MatchRamlStatus, NullMatcher
Instance Attribute Summary collapse
-
#raml ⇒ Object
readonly
Returns the value of attribute raml.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
-
#verb ⇒ Object
readonly
Returns the value of attribute verb.
Instance Method Summary collapse
-
#initialize(raml, verb, url, status) ⇒ Abstract
constructor
A new instance of Abstract.
- #matches?(response) ⇒ Boolean
Constructor Details
#initialize(raml, verb, url, status) ⇒ Abstract
Returns a new instance of Abstract.
10 11 12 13 14 15 |
# File 'lib/rspec/raml/matchers/abstract.rb', line 10 def initialize(raml, verb, url, status) @raml = raml @verb = verb @url = url @status = status end |
Instance Attribute Details
#raml ⇒ Object (readonly)
Returns the value of attribute raml.
8 9 10 |
# File 'lib/rspec/raml/matchers/abstract.rb', line 8 def raml @raml end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
8 9 10 |
# File 'lib/rspec/raml/matchers/abstract.rb', line 8 def response @response end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/rspec/raml/matchers/abstract.rb', line 8 def status @status end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
8 9 10 |
# File 'lib/rspec/raml/matchers/abstract.rb', line 8 def url @url end |
#verb ⇒ Object (readonly)
Returns the value of attribute verb.
8 9 10 |
# File 'lib/rspec/raml/matchers/abstract.rb', line 8 def verb @verb end |
Instance Method Details
#matches?(response) ⇒ Boolean
17 18 19 20 |
# File 'lib/rspec/raml/matchers/abstract.rb', line 17 def matches?(response) @response = response matches_raml? end |