Sha256: bc953ff80744d1b7d88fedab20ec24e28b64a2263131ea7834f643a19f168bab
Contents?: true
Size: 470 Bytes
Versions: 8
Compression:
Stored size: 470 Bytes
Contents
class SugarPNG class Border attr_accessor :left, :right, :top, :bottom, :color def initialize h @color = h[:color] || raise(ArgumentError.new("border color must be set")) @left = (h[:left] || h[:size]).to_i @right = (h[:right] || h[:size]).to_i @top = (h[:top] || h[:size]).to_i @bottom= (h[:bottom]|| h[:size]).to_i end def width @left + @right end def height @top + @bottom end end end
Version data entries
8 entries across 8 versions & 1 rubygems