Sha256: 7b7a6ac0e41dcd1b99fbaa30bb63523d05531001daceb67cb18c8d380903fc84

Contents?: true

Size: 438 Bytes

Versions: 1

Compression:

Stored size: 438 Bytes

Contents

require_relative '../args/card_range'
require_relative '../args/draw'

module Squib
  class Deck

    # DSL method. See http://squib.readthedocs.org
    def background(opts = {})
      range = Args::CardRange.new(opts[:range], deck_size: size)
      draw  = Args::Draw.new(custom_colors).load!(opts, expand_by: size, layout: layout, dpi: dpi)
      range.each { |i| @cards[i].background(draw.color[i]) }
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
squib-0.10.0 lib/squib/api/background.rb