Sha256: 9368a111697cf50e36c5a62bd7a6b44633d5c79f96f12eedba3148e6c689a417
Contents?: true
Size: 412 Bytes
Versions: 9
Compression:
Stored size: 412 Bytes
Contents
module Runbook::Util class StickyHash < Hash def [](key) value = super value.is_a?(Glue) ? value.val : value end def []=(key, value) assoc = self.assoc(key) if assoc.nil? || ! assoc[1].is_a?(Glue) super else assoc[1].val = value end end end class Glue attr_accessor :val def initialize(val) @val = val end end end
Version data entries
9 entries across 9 versions & 2 rubygems