Class: RGBQuad

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-doom.rb

Instance Method Summary collapse

Constructor Details

#initialize(bytes) ⇒ RGBQuad

Returns a new instance of RGBQuad.



8
9
10
# File 'lib/ruby-doom.rb', line 8

def initialize(bytes)
  @r,@g,@b,@res = *bytes
end

Instance Method Details

#to_sObject



11
12
13
# File 'lib/ruby-doom.rb', line 11

def to_s
  return @r.to_s + "," + @g.to_s + "," + @b.to_s
end