Class: FakeWebCurbFu

Inherits:
Object
  • Object
show all
Defined in:
lib/fakeweb_curb-fu.rb

Constant Summary collapse

VERSION =
'0.0.1'

Class Method Summary collapse

Class Method Details

.get(url) ⇒ Object



32
33
34
# File 'lib/fakeweb_curb-fu.rb', line 32

def get(url)
  @uris[url]
end

.register_uri(url, path) ⇒ Object



18
19
20
21
22
23
24
25
# File 'lib/fakeweb_curb-fu.rb', line 18

def register_uri(url, path)
  @uris ||= {}
  if @uris[url]
    @uris[url]
  elsif File.exists?(path)
    @uris[url] = fixture_contents(path)
  end
end

.unregister_uri(url) ⇒ Object



27
28
29
30
# File 'lib/fakeweb_curb-fu.rb', line 27

def unregister_uri(url)
  @uris ||= {}
  @uris.delete(url)
end

.urisObject



14
15
16
# File 'lib/fakeweb_curb-fu.rb', line 14

def uris
  @uris
end