Sha256: 9879484818a861fd5520b60d1fe3223dd13c0f3584a8a9fd138a1caf1e0cf4b4
Contents?: true
Size: 1.03 KB
Versions: 2
Compression:
Stored size: 1.03 KB
Contents
module IconGenerator class Builder include IconGenerator::Validator # Sets up the source and destination instance variables, and # ensures they validate. # # @param source [String] the source image file # @param destination [String] the output directory def initialize(source, destination) @source = source @destination = destination validate_arguments @source, @destination end # Requests a build of the given image type. # # @param type [Symbol] the image type, `:touch` or `:favicon` def build(type) if type == :touch IconGenerator::TouchBuilder.new.build(@source, @destination) elsif type == :favicon IconGenerator::FaviconBuilder.new.build(@source, @destination) end end # Builds a single touch icon. def build_single IconGenerator::TouchBuilder.new.build_single(@source, @destination) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
icon_generator-0.10.1 | lib/icon_generator/builder.rb |
icon_generator-0.10.0 | lib/icon_generator/builder.rb |