Sha256: 9b2d2ccd481ee5c1548eb2ee1c57356cae69e6973bb6681eea16f0b3822d06a7
Contents?: true
Size: 846 Bytes
Versions: 99
Compression:
Stored size: 846 Bytes
Contents
@import "sprites" get(hash, key) for pair in hash return pair[1] if pair[0] == key sprites ?= () sprite(image, widget = 'default', hash = sprites) // test widget error("Widget '" + widget + "' does not exist!") unless get(hash,widget) // get default properties props = get(get(hash,widget), default) for pair in props add-property pair[0], unquote(pair[1]) unless pair[0] is null // get widget properties props = get(get(get(hash,widget),images),image) // test widget image error("Image '" + image + "' does not exist for '" + widget + "' widget!") unless props for pair in props value = pair[1] property = pair[0] value = unquote(value) if typeof(value) is 'string' add-property property, value unless value is null // add some other properties add-property display, block
Version data entries
99 entries across 99 versions & 1 rubygems