Sha256: 156d8c831156dd9f2e9de05df0d45a6304c1ff7b04cf2080fa60845120f3b278
Contents?: true
Size: 652 Bytes
Versions: 18
Compression:
Stored size: 652 Bytes
Contents
module AttributesHelper def current_attributes_object @_attributes_helper_objects&.last end def current_attributes_strategy @_attributes_helper_strategies&.last end def with_attribute_settings(options) @_attributes_helper_objects ||= [] @_attributes_helper_strategies ||= [] if options[:object] @_attributes_helper_objects << options[:object] end if options[:strategy] @_attributes_helper_strategies << options[:strategy] end yield if options[:strategy] @_attributes_helper_strategies.pop end if options[:object] @_attributes_helper_objects.pop end end end
Version data entries
18 entries across 18 versions & 1 rubygems