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.
810 811 812 |
# File 'lib/oktest.rb', line 810 def initialize(expected) @expected = expected end |
Instance Method Details
#===(actual) ⇒ Object
813 814 815 816 |
# File 'lib/oktest.rb', line 813 def ===(actual) #; [!03ozi] compares length of actual value with expected value. return @expected === actual.length end |
#inspect ⇒ Object
817 818 819 820 |
# File 'lib/oktest.rb', line 817 def inspect() #; [!nwv3e] returns 'Length(n)' string. return "Length(#{@expected.inspect})" end |