Sha256: d5a62baa66994c344395142d00529a4705f18bd80fb9a1d04239732e14b1fd96
Contents?: true
Size: 646 Bytes
Versions: 28
Compression:
Stored size: 646 Bytes
Contents
module Dugway module Drops class ThemeImageSetsDrop < BaseDrop def before_method(method_or_key) if source.respond_to?('has_key?') && source.has_key?(method_or_key) && settings_image_sets.find { |image| image['variable'] == method_or_key.to_s } source[method_or_key].map { |image| ImageDrop.new(image.stringify_keys) } else [] end end private def settings_image_sets @settings_image_sets ||= settings.has_key?('image_sets') ? settings['image_sets'] : [] end def settings @settings ||= @context.registers[:settings] end end end end
Version data entries
28 entries across 28 versions & 1 rubygems