Method: Orchestrate::Collection#stub

Defined in:
lib/orchestrate/collection.rb

#stub(key_name) ⇒ KeyValue

Returns an unloaded KeyValue object with the given key_name, if you need to access Refs, Relations or Events without loading the KeyValue's value.

Parameters:

  • key_name (#to_s)

    The key of the item.

Returns:



151
152
153
154
155
# File 'lib/orchestrate/collection.rb', line 151

def stub(key_name)
  kv = KeyValue.new(self, key_name)
  kv.value = nil
  kv
end