class Color::RGB
Public Instance Methods
==(other)
click to toggle source
Add to check equality
# File lib/mc_dot_art_maker/extern_lib_extension.rb, line 19 def ==(other) @r == other.r && @g == other.g && @b == other.b end
eql?(other)
click to toggle source
Add to use this object for hash key
# File lib/mc_dot_art_maker/extern_lib_extension.rb, line 23 def eql?(other) @r.eql?(other.r) && @g.eql?(other.g) && @b.eql?(other.b) end
hash()
click to toggle source
# File lib/mc_dot_art_maker/extern_lib_extension.rb, line 26 def hash code = 17 code = 37*code + @r.hash code = 37*code + @g.hash code = 37*code + @b.hash code end