Sha256: 6fbc36106d5b11909394630391c33178881d5da237273e586259d43575c087aa
Contents?: true
Size: 882 Bytes
Versions: 15
Compression:
Stored size: 882 Bytes
Contents
module Sprite class ImageConfig def initialize(image_info, global_config_info) @image_info = image_info @global_config_info = global_config_info end def sources @image_info['sources'].to_a end def name @image_info['name'] end def format @image_info['format'] || @global_config_info["default_format"] end def quality @image_info['quality'] || @global_config_info["default_quality"] end def background_color @image_info['background_color'] || @global_config_info["default_background_color"] end def spaced_by @image_info['spaced_by'] || @global_config_info["default_spacing"] || 0 end def resize_to @image_info['resize_to'] || @global_config_info['resize_to'] end def horizontal_layout? @image_info['align'].to_s == 'horizontal' end end end
Version data entries
15 entries across 15 versions & 2 rubygems