Sha256: b453f99867e49c52dd4f35ab22cce62227f1dddd9e2bbd8ce11bc197ef93a735
Contents?: true
Size: 911 Bytes
Versions: 12
Compression:
Stored size: 911 Bytes
Contents
module Contentful module Management module Resource # Adds the feature to have properties and system data reload for Resource. module Refresher # Reload an object # Updates the current version of the object to the version on the system def reload resource = refresh_find refresh_data(resource) if resource.is_a? self.class end # @private def refresh_find self.class.find(client, space.id, id) end # @private def refresh_data(resource) if resource.is_a? Error resource else @properties = resource.instance_variable_get(:@properties) @fields = resource.instance_variable_get(:@fields) @sys = resource.instance_variable_get(:@sys).merge(locale: locale) self end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems