lib/caracal/core/images.rb in caracal-0.1.1 vs lib/caracal/core/images.rb in caracal-0.1.2

- old
+ new

@@ -14,11 +14,12 @@ #------------------------------------------------------------- # Public Methods #------------------------------------------------------------- - def img(url = nil, options={}, &block) - options.merge!({ url: url }) if url + def img(*args, &block) + options = Caracal::Utilities.extract_options!(args) + options.merge!({ url: args.first }) if args.first model = Caracal::Core::Models::ImageModel.new(options, &block) if model.valid? contents << model else \ No newline at end of file