Sha256: 7ded82670ca44856d06cf782bc86e4108fd8ba1c9b37f3b12f654210c7e97fec
Contents?: true
Size: 573 Bytes
Versions: 3
Compression:
Stored size: 573 Bytes
Contents
module Tableficate class Caption attr_reader :attrs def initialize(*args, &block) if block_given? @attrs = args.first || {} @content = block else @content = args[0] @attrs = args[1] || {} end end def value if @content.is_a?(String) @content else output = @content.call if output.is_a?(ActionView::OutputBuffer) '' else output = output.html_safe if output.respond_to? :html_safe output end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tableficate-0.3.2 | lib/tableficate/caption.rb |
tableficate-0.3.1 | lib/tableficate/caption.rb |
tableficate-0.3.0 | lib/tableficate/caption.rb |