Sha256: d389defdbe6f2331afcff5a31a6fd1c408f1a0f72f7ba101c5079008d255bdd3
Contents?: true
Size: 1.12 KB
Versions: 17
Compression:
Stored size: 1.12 KB
Contents
require 'caracal/core/models/iframe_model' require 'caracal/errors' module Caracal module Core # This module encapsulates all the functionality related to inserting # word document snippets into the document. # module IFrames def self.included(base) base.class_eval do #------------------------------------------------------------- # Public Methods #------------------------------------------------------------- def iframe(options={}, &block) model = Caracal::Core::Models::IFrameModel.new(options, &block) if model.valid? model.preprocess! model.namespaces.each do |(prefix, href)| namespace({ prefix: prefix, href: href }) end model.ignorables.each do |prefix| ignorable(prefix) end contents << model else raise Caracal::Errors::InvalidModelError, 'IFrameModel requires either the :url or :data argument.' end model end end end end end end
Version data entries
17 entries across 17 versions & 2 rubygems