Module: NeverBounce::CLI::Feature::Eigencache::InstanceMethods

Defined in:
lib/never_bounce/cli/feature/eigencache.rb

Instance Method Summary collapse

Instance Method Details

#_cacheHash

Hidden cache.

def body
  _cache[:body] ||= File.read("my-bulky-body.csv")
end

def body=(v)
  _cache[:body] = v
end

Returns:

  • (Hash)

25
26
27
28
29
30
31
# File 'lib/never_bounce/cli/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

#eigenClass (private)

Object's eigenclass (singleton class).

Returns:

  • (Class)

37
38
39
# File 'lib/never_bounce/cli/feature/eigencache.rb', line 37

def eigen
  class << self; self; end
end