app/models/concerns/strong_key_value_store.rb
# The singleton instance of this strong key value store.
#
# The instance returned is the *last successfully saved* one, and does not
# contain any as yet unsaved values, which will be lost. So in effect, this
# behaves like ActiveRecord::Base#first.
#
# A better name for this method may have been 'fetch', but in the spirit of
# mimicking ActiveRecord, we stuck with 'instance' to stay faithful to how
# several gems have implemented ActiveRecord singleton behaviour.
#
# @return [Object] the singleton instance of the including class
The singleton instance of this strong key value store.
The instance returned is the *last successfully saved* one, and does not
contain any as yet unsaved values, which will be lost. So in effect, this
behaves like ActiveRecord::Base#first.

A better name for this method may have been 'fetch', but in the spirit of
mimicking ActiveRecord, we stuck with 'instance' to stay faithful to how
several gems have implemented ActiveRecord singleton behaviour.
The singleton instance of this strong key value store . The instance returned is the * last successfully saved * one and does not contain any as yet unsaved values which will be lost . So in effect this behaves like ActiveRecord :: Base#first . A better name for this method may have been ' fetch ' but in the spirit of mimicking ActiveRecord we stuck with ' instance ' to stay faithful to how several gems have implemented ActiveRecord singleton behaviour .
def instance
      instance = self.new
      hash = underlying_raw_kvs.get_all
      permitted_keys.each { |key| instance.send("#{key}=", hash[key]) }
      instance
    end
def instance instance = self . new hash = underlying_raw_kvs . get_all permitted_keys . each { | key | instance . send ( "#{key}=" , hash [ key ] ) } instance end
The singleton instance of this strong key value store.
The singleton instance of this strong key value store .
the singleton instance of the including class
the singleton instance of the including class
Object