Sha256: 70eea344bbe603d2a2de038b2e48440dac44c6ba61d4b503e1edfcc0b53fb6a7
Contents?: true
Size: 569 Bytes
Versions: 5
Compression:
Stored size: 569 Bytes
Contents
require "fileutils" require "esvg/version" require "esvg/svg" if defined?(Rails) require "esvg/helpers" require "esvg/railties" end module Esvg extend self def new(options={}) @svgs = SVG.new(options) end def svgs @svgs end def embed(key) new.embed(key) end def rails? defined?(Rails) end def build(options={}) new(options).build end def precompile_assets if rails? && defined?(Rake) ::Rake::Task['assets:precompile'].enhance do build(compress: true, print: true) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
esvg-4.1.3 | lib/esvg.rb |
esvg-4.1.2 | lib/esvg.rb |
esvg-4.1.1 | lib/esvg.rb |
esvg-4.1.0 | lib/esvg.rb |
esvg-4.0.0 | lib/esvg.rb |