Sha256: b9c0a587fb18b17a7cd15888d628e5d7a37c3d907b1bb9d035afe4a2709a0259
Contents?: true
Size: 687 Bytes
Versions: 11
Compression:
Stored size: 687 Bytes
Contents
module Conjur module HasAttributes def to_json(options = {}) attributes end def attributes=(a); @attributes = a; end def attributes return @attributes if @attributes fetch end def save self.put(attributes.to_json) end # Reload the attributes. This action can be used to guarantee a current view of the entity in the case # that it has been modified by an update method or by an external party. def refresh fetch end protected def invalidate(&block) yield ensure @attributes = nil end def fetch @attributes = JSON.parse(get.body) end end end
Version data entries
11 entries across 11 versions & 1 rubygems