Sha256: 9ed96a7852dba405f1a28026fba5b99a742983acb62f8fadc6d24ce6fe3c08aa
Contents?: true
Size: 1.05 KB
Versions: 22
Compression:
Stored size: 1.05 KB
Contents
class Card class Bootstrap # shared methods for OldComponent and TagMethod module Content private def process_collected_content tag_name, opts collected_content = @content.pop tag_name = opts.delete(:tag) if tag_name == :yield add_content content_tag(tag_name, collected_content, opts, false) end def process_content &content_block content, opts = yield wrappers = @wrap.pop if wrappers.present? process_wrappers wrappers, content, &content_block else add_content content end opts end def process_append @append.pop.each do |block| add_content instance_exec(&block) end end def process_wrappers wrappers, content, &content_block while wrappers.present? wrapper = wrappers.shift if wrapper.is_a? Symbol send wrapper, &content_block else instance_exec content, &wrappers.shift end end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems