Sha256: 3be945e10d1bcb12ed861bdadba949b553c348982e5ed71afb17878ac64ebf89
Contents?: true
Size: 589 Bytes
Versions: 3
Compression:
Stored size: 589 Bytes
Contents
require 'rainbow/refinement' require_relative 'save_png' require_relative 'save_pdf' module Squib class Deck using Rainbow # we can colorize strings now! def save(opts = {}) fmts = Array(opts[:format]) warn 'Must specify format :png and/or :pdf' if fmts.empty? opts.delete :format # not needed anymore save_png(opts) if fmts.include? :png save_pdf(opts) if fmts.include? :pdf uns = fmts - [:pdf, :png ] unless uns.empty? warn "Unsupported format(s) #{uns} to #{'save'.cyan}()", uplevel: 1 end self end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
squib-0.19.0 | lib/squib/dsl/save.rb |
squib-0.19.0b | lib/squib/dsl/save.rb |
squib-0.19.0a | lib/squib/dsl/save.rb |