Class: Discordrb::ColorRGB
- Inherits:
-
Object
- Object
- Discordrb::ColorRGB
- Defined in:
- lib/discordrb/data.rb
Instance Attribute Summary collapse
-
#blue ⇒ Object
readonly
Returns the value of attribute blue.
-
#green ⇒ Object
readonly
Returns the value of attribute green.
-
#red ⇒ Object
readonly
Returns the value of attribute red.
Instance Method Summary collapse
-
#initialize(combined) ⇒ ColorRGB
constructor
A new instance of ColorRGB.
Constructor Details
#initialize(combined) ⇒ ColorRGB
Returns a new instance of ColorRGB.
385 386 387 388 389 |
# File 'lib/discordrb/data.rb', line 385 def initialize(combined) @red = (combined >> 16) & 0xFF @green = (combined >> 8) & 0xFF @blue = combined & 0xFF end |
Instance Attribute Details
#blue ⇒ Object (readonly)
Returns the value of attribute blue.
383 384 385 |
# File 'lib/discordrb/data.rb', line 383 def blue @blue end |
#green ⇒ Object (readonly)
Returns the value of attribute green.
383 384 385 |
# File 'lib/discordrb/data.rb', line 383 def green @green end |
#red ⇒ Object (readonly)
Returns the value of attribute red.
383 384 385 |
# File 'lib/discordrb/data.rb', line 383 def red @red end |