Sha256: 57616b2a3aa6d49e74001bb80833c845048925e4d67b0d2cab22cad8d299b4d6

Contents?: true

Size: 465 Bytes

Versions: 1

Compression:

Stored size: 465 Bytes

Contents

module BuzzImage
  def buzz_image_tag(*args, &block)
    options = insert_buzz_class(args.extract_options!)
    args << options
    image_tag(*args, &block)
  end

  def insert_buzz_class(options)
    class_name = 'buzz_image'
    if options.key?(:class)
      options[:class] += " #{class_name}"
    elsif options.key?('class')
      options['class'] += " #{class_name}"
    else
      options[:class] = class_name
    end
    options
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
buzz_image-0.0.1 lib/buzz_image/buzz_image_helper.rb