Sha256: 689569bb6e7b1c69fd0a10c6f283f61a3f92967a0e68d14e8a0b14d7cbabb9c0
Contents?: true
Size: 1.51 KB
Versions: 4
Compression:
Stored size: 1.51 KB
Contents
module Squib module Sprues UNIT_REGEX = /^(\d*[.])?\d+(in|cm|mm)$/ ROTATE_REGEX = /^(\d*[.])?\d+(deg|rad)?$/ SCHEMA = { 'sheet_width' => UNIT_REGEX, 'sheet_height' => UNIT_REGEX, 'card_width' => UNIT_REGEX, 'card_height' => UNIT_REGEX, 'position_reference' => ClassyHash::G.enum(:topleft, :center), 'rotate' => [ :optional, Numeric, ClassyHash::G.enum(:clockwise, :counterclockwise, :turnaround), ROTATE_REGEX ], 'crop_line' => { 'style' => [ ClassyHash::G.enum(:solid, :dotted, :dashed), Sprues::CropLineDash::VALIDATION_REGEX ], 'width' => UNIT_REGEX, 'color' => [String, Symbol], 'overlay' => ClassyHash::G.enum( :on_margin, :overlay_on_cards, :beneath_cards ), 'lines' => [[{ 'type' => ClassyHash::G.enum(:horizontal, :vertical), 'position' => UNIT_REGEX, 'style' => [ :optional, ClassyHash::G.enum(:solid, :dotted, :dashed) ], 'width' => [:optional, UNIT_REGEX], 'color' => [:optional, String, Symbol], 'overlay_on_cards' => [:optional, TrueClass] }]] }, 'cards' => [[{ 'x' => UNIT_REGEX, 'y' => UNIT_REGEX, 'rotate' => [ :optional, Numeric, ClassyHash::G.enum(:clockwise, :counterclockwise, :turnaround), ROTATE_REGEX ] }]] }.freeze end end
Version data entries
4 entries across 4 versions & 1 rubygems