Module: Vectory

Defined in:
lib/vectory.rb,
lib/vectory.rb,
lib/vectory.rb,
lib/vectory/ps.rb,
lib/vectory/cli.rb,
lib/vectory/emf.rb,
lib/vectory/eps.rb,
lib/vectory/pdf.rb,
lib/vectory/svg.rb,
lib/vectory/image.rb,
lib/vectory/utils.rb,
lib/vectory/errors.rb,
lib/vectory/vector.rb,
lib/vectory/datauri.rb,
lib/vectory/version.rb,
lib/vectory/platform.rb,
lib/vectory/conversion.rb,
lib/vectory/file_magic.rb,
lib/vectory/svg_mapping.rb,
lib/vectory/image_resize.rb,
lib/vectory/svg_document.rb,
lib/vectory/configuration.rb,
lib/vectory/inkscape_wrapper.rb,
lib/vectory/conversion/strategy.rb,
lib/vectory/ghostscript_wrapper.rb,
lib/vectory/conversion/inkscape_strategy.rb,
lib/vectory/conversion/ghostscript_strategy.rb

Overview

Define additional module methods

Defined Under Namespace

Modules: Conversion Classes: CLI, Configuration, ConversionError, Datauri, Emf, Eps, Error, FileMagic, GhostscriptNotFoundError, GhostscriptWrapper, Image, ImageResize, InkscapeNotFoundError, InkscapeQueryError, InkscapeWrapper, InvalidFormatError, NotImplementedError, NotWrittenToDiskError, ParsingError, Pdf, Platform, Ps, Svg, SvgDocument, SvgMapping, SystemCallError, Utils, Vector

Constant Summary collapse

VERSION =
"0.10.0"

Class Method Summary collapse

Class Method Details

.convert(image, format) ⇒ Object



68
69
70
# File 'lib/vectory.rb', line 68

def self.convert(image, format)
  image.convert(format)
end

.image_resize(img, path, maxheight, maxwidth) ⇒ Object



72
73
74
# File 'lib/vectory.rb', line 72

def self.image_resize(img, path, maxheight, maxwidth)
  Vectory::ImageResize.new.call(img, path, maxheight, maxwidth)
end

.root_pathObject



64
65
66
# File 'lib/vectory.rb', line 64

def self.root_path
  Pathname.new(File.dirname(__dir__))
end

.uiObject



55
56
57
58
59
60
61
62
# File 'lib/vectory.rb', line 55

def self.ui
  @ui ||= Logger.new($stdout).tap do |logger|
    logger.level = ENV["VECTORY_LOG"] || Logger::WARN
    logger.formatter = proc { |_severity, _datetime, _progname, msg|
      "#{msg}\n"
    }
  end
end