Class: Restfolia::EntryPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/restfolia/monkey_patch.rb

Instance Method Summary collapse

Instance Method Details

#get(params = nil) ⇒ Object



7
8
9
10
11
12
13
14
15
# File 'lib/rack/restfolia/monkey_patch.rb', line 7

def get(params = nil)
  if cached_response = Rack::Restfolia::Cache.get(@url)
    cached_response
  else
    response = get_original(params)
    Rack::Restfolia::Cache.store(@url, response)
    response
  end
end

#get_originalObject



5
# File 'lib/rack/restfolia/monkey_patch.rb', line 5

alias :get_original :get