Module: Deas::ErbTags::ImageTag::Method

Defined in:
lib/deas-erbtags/image_tag.rb

Instance Method Summary collapse

Instance Method Details

#image_tag(source, *args) ⇒ Object



12
13
14
15
16
17
# File 'lib/deas-erbtags/image_tag.rb', line 12

def image_tag(source, *args)
  opts = args.last.kind_of?(::Hash) ? args.pop : {}
  opts.update(:src => source.to_s)

  tag(:img, opts)
end