Module: ImageZoomer

Defined in:
lib/image_zoomer/engine.rb,
lib/image_zoomer/version.rb,
lib/image_zoomer/configuration.rb,
lib/image_zoomer/zoom_image_helper.rb

Defined Under Namespace

Classes: Configuration, Engine

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Instance Method Details

#insert_zoom_class(options) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/image_zoomer/zoom_image_helper.rb', line 8

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

#zoom_image_tag(*args, &block) ⇒ Object



2
3
4
5
6
# File 'lib/image_zoomer/zoom_image_helper.rb', line 2

def zoom_image_tag(*args, &block)
	options = insert_zoom_class(args.extract_options!)
	args << options
	image_tag(*args, &block)
end