Sha256: a51c66eba037301d68bd9e75ed5403f57a7271bf30bdb28c2bc687cda361bb89
Contents?: true
Size: 847 Bytes
Versions: 44
Compression:
Stored size: 847 Bytes
Contents
# frozen_string_literal: true require 'ehbrs/observers/with_persistence' require 'ehbrs/user_dirs' module Ehbrs module Self module Observers class WithPersistence enable_simple_cache common_constructor :label def check_current_value observer.check(current_value) end def changing_value? observer.changing_value?(current_value) end private def current_value_uncached calculate_value end def observer_uncached ::Ehbrs::Observers::WithPersistence.new(persistence_path, blank_value: :raise) end def persistence_path_uncached ::Ehbrs::UserDirs.data.child('observers', label.to_s.parameterize) .content_path.to_pathname end end end end end
Version data entries
44 entries across 44 versions & 1 rubygems