Sha256: 05171ee837e4c373e01a88bd35454d884a776ead7eafa05230955593ccbd3711
Contents?: true
Size: 591 Bytes
Versions: 23
Compression:
Stored size: 591 Bytes
Contents
module Dugway module Drops class ThemeDrop < BaseDrop def before_method(method_or_key) if source.respond_to?('has_key?') && source.has_key?(method_or_key) && images.find { |image| image['variable'] == method_or_key.to_s } return ImageDrop.new(source[method_or_key].stringify_keys) end super end private def images @images ||= settings.has_key?('images') ? settings['images'] : [] end def settings @settings ||= @context.registers[:settings] end end end end
Version data entries
23 entries across 23 versions & 1 rubygems