Class: Tupelo::Client::Matcher

Inherits:
WaiterBase show all
Defined in:
lib/tupelo/client/reader.rb

Instance Attribute Summary collapse

Attributes inherited from WaiterBase

#once, #queue, #template

Instance Method Summary collapse

Methods inherited from WaiterBase

#gloms, #peek, #wait

Constructor Details

#initialize(template, client, all: false) ⇒ Matcher

Returns a new instance of Matcher.



99
100
101
102
# File 'lib/tupelo/client/reader.rb', line 99

def initialize template, client, all: false
  super template, client
  @all = all
end

Instance Attribute Details

#allObject (readonly)

this is only cosmetic – see #inspect



97
98
99
# File 'lib/tupelo/client/reader.rb', line 97

def all
  @all
end

Instance Method Details

#failsObject



104
105
106
# File 'lib/tupelo/client/reader.rb', line 104

def fails
  queue << nil
end

#inspectObject



108
109
110
111
112
# File 'lib/tupelo/client/reader.rb', line 108

def inspect
  e = all ? "all " : ""
  t = template.inspect
  "<#{self.class}: #{e}#{t}>"
end