Sha256: f01df7c2e546a9f93d4ba4d244485ab82c24c020d97eebce42b1f3982f6a3fb1
Contents?: true
Size: 522 Bytes
Versions: 14
Compression:
Stored size: 522 Bytes
Contents
module AttributesHelper def current_attributes_object @_current_attribute_settings&.dig(:object) end def current_attributes_strategy @_current_attributes_settings&.dig(:strategy) end def with_attribute_settings(object: current_attributes_object, strategy: current_attributes_strategy) old_attribute_settings = @_current_attribute_settings @_current_attribute_settings = {object: object, strategy: strategy} yield ensure @_current_attribute_settings = old_attribute_settings end end
Version data entries
14 entries across 14 versions & 1 rubygems