Sha256: 5b0667bd8640f20faf37f9788e0bc435e2ef5e4dadbf51872c8ca33d5eb16674
Contents?: true
Size: 391 Bytes
Versions: 31
Compression:
Stored size: 391 Bytes
Contents
module ApiResource module Decorators class CachingDecorator attr_reader :owner attr_reader :ttl def initialize(owner, ttl) @owner = owner @ttl = ttl end def method_missing(method_name, *args, &block) ApiResource.with_ttl(self.ttl) do self.owner.send(method_name, *args, &block) end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems