Class | DocumentStyles::Color
In: | lib/document_styles.rb
Parent: | Object

色のためのクラス。

### Methods

blue= green= new red= to_a

### Attributes

blue | [R] |
green | [R] |
red | [R] |

### Public Class methods

new(r = 0, g = 0, b = 0)

[Source]

        # File lib/document_styles.rb, line 6
     6:     def initialize(r = 0, g = 0, b = 0)
     7:       @red   = r.to_i
     8:       @green = g.to_i
     9:       @blue  = b.to_i
    10:       validate
    11:     end

### Public Instance methods

blue=(val)

[Source]

        # File lib/document_styles.rb, line 25
    25:     def blue=(val)
    26:       @blue = val.to_i
    27:       validate
    28:     end

green=(val)

[Source]

        # File lib/document_styles.rb, line 20
    20:     def green=(val)
    21:       @green = val.to_i
    22:       validate
    23:     end

red=(val)

[Source]

        # File lib/document_styles.rb, line 15
    15:     def red=(val)
    16:       @red = val.to_i
    17:       validate
    18:     end

to_a()

[Source]

        # File lib/document_styles.rb, line 30
    30:     def to_a
    31:       return [red, green, blue]
    32:     end

[Validate]