Class: WSDirector::Protocols::PartialMatcher
- Inherits:
-
Object
- Object
- WSDirector::Protocols::PartialMatcher
- Defined in:
- lib/wsdirector/protocols/base.rb
Instance Attribute Summary collapse
-
#obj ⇒ Object
readonly
Returns the value of attribute obj.
Instance Method Summary collapse
-
#initialize(obj) ⇒ PartialMatcher
constructor
A new instance of PartialMatcher.
- #inspect ⇒ Object
- #matches?(actual) ⇒ Boolean
- #truncate ⇒ Object
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
#obj ⇒ Object (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
#inspect ⇒ Object
93 94 95 |
# File 'lib/wsdirector/protocols/base.rb', line 93 def inspect "an object including #{obj.inspect}" end |
#matches?(actual) ⇒ Boolean
89 90 91 |
# File 'lib/wsdirector/protocols/base.rb', line 89 def matches?(actual) obj.partially_matches?(actual) end |
#truncate ⇒ Object
97 |
# File 'lib/wsdirector/protocols/base.rb', line 97 def truncate(...) = obj.truncate(...) |