Class: Ra::Pattern::Stripes

Inherits:
Base
  • Object
show all
Defined in:
lib/ra/pattern/stripes.rb

Overview

A stripe pattern that alternates colors using:

colors[

Instance Attribute Summary collapse

Attributes inherited from Base

#transform

Instance Method Summary collapse

Methods inherited from Base

#color

Constructor Details

#initialize(colors:, transform: Transform::IDENTITY) ⇒ Stripes

Returns a new instance of Stripes.

Parameters:

  • colors (Array<Ra::Color>)
  • transform (Ra::Matrix) (defaults to: Transform::IDENTITY)


13
14
15
16
# File 'lib/ra/pattern/stripes.rb', line 13

def initialize(colors:, transform: Transform::IDENTITY)
  super(transform:)
  @colors = colors
end

Instance Attribute Details

#colorsObject

Returns the value of attribute colors.



9
10
11
# File 'lib/ra/pattern/stripes.rb', line 9

def colors
  @colors
end