Sha256: a57253f9e0071d4a698d42a6f52d8b0bf8ea79efa9da1f626ab33735fcce0f92
Contents?: true
Size: 876 Bytes
Versions: 2
Compression:
Stored size: 876 Bytes
Contents
module Caisson::Helpers class Grid attr_reader :core delegate :capture, to: :core delegate :content_tag, to: :core def initialize(core) @core = core end def column(span, options={}, &block) options.reverse_merge! class: nil, id: nil, small: nil, tag: :div css_class = ['columns'] css_class << "large-#{span}" css_class << "small-#{options[:small]}" if options[:small] css_class << options[:class] if options[:class] content_tag(options[:tag], capture(&block), class: css_class.join(' '), id: options[:id]) end def row(options={}, &block) options.reverse_merge! class: nil, id: nil, tag: :div css_class = ['row'] css_class << options[:class] if options[:class] content_tag(options[:tag], capture(&block), class: css_class.join(' '), id: options[:id]) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
caisson-0.0.3 | lib/caisson/helpers/grid.rb |
caisson-0.0.2 | lib/caisson/helpers/grid.rb |