Class: Ra::Pattern::Rings

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

Overview

A rings 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: DEFAULT_TRANSFORM) ⇒ Rings

Returns a new instance of Rings.

Parameters:

  • colors (Array<Rays::Color>)
  • transform (Rays::Matrix) (defaults to: DEFAULT_TRANSFORM)


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

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

Instance Attribute Details

#colorsObject

Returns the value of attribute colors.



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

def colors
  @colors
end