Sha256: f645ee31c90cd1f9f59b478968b37bfcd51c03765bddcb73ee2438fdf7d813f5

Contents?: true

Size: 437 Bytes

Versions: 13

Compression:

Stored size: 437 Bytes

Contents

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

module Squib
  class Deck

    # DSL method. See http://squib.readthedocs.io
    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

13 entries across 13 versions & 1 rubygems

Version Path
squib-0.15.3 lib/squib/api/background.rb
squib-0.15.0 lib/squib/api/background.rb
squib-0.14.3.pre1 lib/squib/api/background.rb
squib-0.14.1 lib/squib/api/background.rb
squib-0.14.0 lib/squib/api/background.rb
squib-0.14.beta1 lib/squib/api/background.rb
squib-0.13.4 lib/squib/api/background.rb
squib-0.13.3 lib/squib/api/background.rb
squib-0.13.2 lib/squib/api/background.rb
squib-0.13.1 lib/squib/api/background.rb
squib-0.13.0 lib/squib/api/background.rb
squib-0.12.0 lib/squib/api/background.rb
squib-0.11.0 lib/squib/api/background.rb