Module: NeverBounce::API::Feature::Eigencache::InstanceMethods
- Defined in:
- lib/never_bounce/api/feature/eigencache.rb
Instance Method Summary collapse
-
#_cache ⇒ Hash
Hidden cache.
-
#eigen ⇒ Class
private
Object’s eigenclass (singleton class).
Instance Method Details
#_cache ⇒ Hash
Hidden cache.
def body
_cache[:body] ||= File.read("my-bulky-body.csv")
end
def body=(v)
_cache[:body] = v
end
25 26 27 28 29 30 31 |
# File 'lib/never_bounce/api/feature/eigencache.rb', line 25 def _cache if eigen.instance_variable_defined?(k = :@cache) eigen.instance_variable_get(k) else eigen.instance_variable_set(k, {}) end end |
#eigen ⇒ Class (private)
Object’s eigenclass (singleton class).
38 39 40 |
# File 'lib/never_bounce/api/feature/eigencache.rb', line 38 def eigen class << self; self; end end |