lib/caracal/core/images.rb in caracal-0.1.0 vs lib/caracal/core/images.rb in caracal-0.1.1
- old
+ new
@@ -14,12 +14,11 @@
#-------------------------------------------------------------
# Public Methods
#-------------------------------------------------------------
- def img(*text, **options, &block)
- text.flatten!
- options.merge!( { url: text[0] }) unless text[0].nil?
+ def img(url = nil, options={}, &block)
+ options.merge!({ url: url }) if url
model = Caracal::Core::Models::ImageModel.new(options, &block)
if model.valid?
contents << model
else
\ No newline at end of file