Class: Rnote::Persister

Inherits:
Object
  • Object
show all
Defined in:
lib/rnote/persister.rb

Instance Method Summary collapse

Constructor Details

#initializePersister

Returns a new instance of Persister.



232
233
234
235
# File 'lib/rnote/persister.rb', line 232

def initialize()
  @auth_cache = AuthCache.new
  @search_cache = SearchCache.new
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



237
238
239
240
241
242
243
244
245
# File 'lib/rnote/persister.rb', line 237

def method_missing(method,*args)
  if @auth_cache.respond_to?(method)
    @auth_cache.method(method).call(*args)
  elsif @search_cache.respond_to?(method)
    @search_cache.method(method).call(*args)
  else
    super
  end
end