class Oktest::JsonMatcher::Length

Public Class Methods

new(expected) click to toggle source
# File lib/oktest.rb, line 769
def initialize(expected)
  @expected = expected
end

Public Instance Methods

===(actual) click to toggle source
# File lib/oktest.rb, line 772
def ===(actual)
  #; [!03ozi] compares length of actual value with expected value.
  return @expected === actual.length
end
inspect() click to toggle source
# File lib/oktest.rb, line 776
def inspect()
  #; [!nwv3e] returns 'Length(n)' string.
  return "Length(#{@expected.inspect})"
end