Class: WSDirector::Protocols::PartialMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/wsdirector/protocols/base.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(obj) ⇒ PartialMatcher

Returns a new instance of PartialMatcher.



85
86
87
# File 'lib/wsdirector/protocols/base.rb', line 85

def initialize(obj)
  @obj = obj
end

Instance Attribute Details

#objObject (readonly)

Returns the value of attribute obj.



83
84
85
# File 'lib/wsdirector/protocols/base.rb', line 83

def obj
  @obj
end

Instance Method Details

#inspectObject



93
94
95
# File 'lib/wsdirector/protocols/base.rb', line 93

def inspect
  "an object including #{obj.inspect}"
end

#matches?(actual) ⇒ Boolean

Returns:

  • (Boolean)


89
90
91
# File 'lib/wsdirector/protocols/base.rb', line 89

def matches?(actual)
  obj.partially_matches?(actual)
end

#truncateObject



97
# File 'lib/wsdirector/protocols/base.rb', line 97

def truncate(...) = obj.truncate(...)