Class: RSpec::Raml::Matchers::Abstract

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#ramlObject (readonly)

Returns the value of attribute raml.



8
9
10
# File 'lib/rspec/raml/matchers/abstract.rb', line 8

def raml
  @raml
end

#responseObject (readonly)

Returns the value of attribute response.



8
9
10
# File 'lib/rspec/raml/matchers/abstract.rb', line 8

def response
  @response
end

#statusObject (readonly)

Returns the value of attribute status.



8
9
10
# File 'lib/rspec/raml/matchers/abstract.rb', line 8

def status
  @status
end

#urlObject (readonly)

Returns the value of attribute url.



8
9
10
# File 'lib/rspec/raml/matchers/abstract.rb', line 8

def url
  @url
end

#verbObject (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

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/rspec/raml/matchers/abstract.rb', line 17

def matches?(response)
  @response = response
  matches_raml?
end