Module: Kernel

Defined in:
lib/rest-core/test.rb

Instance Method Summary collapse

Instance Method Details

#eq?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/rest-core/test.rb', line 16

def eq? rhs
  self == rhs
end

#lt?(rhs) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/rest-core/test.rb', line 20

def lt? rhs
  self < rhs
end

#with_imgObject



24
25
26
27
28
29
30
31
32
# File 'lib/rest-core/test.rb', line 24

def with_img
  f = Tempfile.new(['img', '.jpg'])
  n = File.basename(f.path)
  f.write('a'*10)
  f.rewind
  yield(f, n)
ensure
  f.close!
end