Sha256: 4b4d6093cecd7b8f1d26f48bfeab183a53833f855dcf5b3ccf31a299a9a1cf18

Contents?: true

Size: 787 Bytes

Versions: 5

Compression:

Stored size: 787 Bytes

Contents

module Squib
  class Deck
    # Fills the background with the given color
    # @example
    #   background color: :white
    #
    # Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion}
    #
    # @option opts range [Enumerable] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges}
    # @option opts color [String] (:black) the color the font will render to. See {file:README.md#Specifying_Colors___Gradients Specifying Colors & Gradients}.
    # @return [nil] nothing
    # @api public
    def background(opts = {})
      opts = needs(opts,[:range, :color])
      opts[:range].each { |i| @cards[i].background(opts[:color][i]) }
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
squib-0.6.0 lib/squib/api/background.rb
squib-0.5.1 lib/squib/api/background.rb
squib-0.5.0 lib/squib/api/background.rb
squib-0.4.0 lib/squib/api/background.rb
squib-0.3.0 lib/squib/api/background.rb