Class: Oktest::JsonMatcher::Length
- Inherits:
-
Object
- Object
- Oktest::JsonMatcher::Length
- Defined in:
- lib/oktest.rb
Instance Method Summary collapse
- #===(actual) ⇒ Object
-
#initialize(expected) ⇒ Length
constructor
A new instance of Length.
- #inspect ⇒ Object
Constructor Details
#initialize(expected) ⇒ Length
Returns a new instance of Length.
797 798 799 |
# File 'lib/oktest.rb', line 797 def initialize(expected) @expected = expected end |
Instance Method Details
#===(actual) ⇒ Object
800 801 802 803 |
# File 'lib/oktest.rb', line 800 def ===(actual) #; [!03ozi] compares length of actual value with expected value. return @expected === actual.length end |
#inspect ⇒ Object
804 805 806 807 |
# File 'lib/oktest.rb', line 804 def inspect() #; [!nwv3e] returns 'Length(n)' string. return "Length(#{@expected.inspect})" end |