Class: Waves::Matchers::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/waves/matchers/resource.rb

Overview

todo: hmmm … it turns out there don’t seem to be a whole lot of matchers that aren’t request-based. and by “whole lot” i really mean “any” … so maybe we don’t need this extra layer of abstraction? -dan

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Resource

Returns a new instance of Resource.



15
16
17
# File 'lib/waves/matchers/resource.rb', line 15

def initialize( options )
  @matcher = Waves::Matchers::Request.new( options )
end

Instance Method Details

#[](*args) ⇒ Object



20
# File 'lib/waves/matchers/resource.rb', line 20

def []( *args ) ; call( *args ) ; end

#call(resource) ⇒ Object



19
# File 'lib/waves/matchers/resource.rb', line 19

def call( resource ) ; @matcher.call( resource.request ) ; end