Class: Rubycord::Components::SelectMenu::Option
- Inherits:
-
Object
- Object
- Rubycord::Components::SelectMenu::Option
- Defined in:
- lib/rubycord/data/component.rb
Overview
A select menu option.
Instance Attribute Summary collapse
- #description ⇒ String? readonly
- #emoji ⇒ Emoji? readonly
- #label ⇒ String readonly
- #value ⇒ String readonly
Instance Method Summary collapse
-
#initialize(data) ⇒ Option
constructor
A new instance of Option.
Constructor Details
#initialize(data) ⇒ Option
Returns a new instance of Option.
134 135 136 137 138 139 |
# File 'lib/rubycord/data/component.rb', line 134 def initialize(data) @label = data["label"] @value = data["value"] @description = data["description"] @emoji = Emoji.new(data["emoji"], @bot) if data["emoji"] end |
Instance Attribute Details
#description ⇒ String? (readonly)
128 129 130 |
# File 'lib/rubycord/data/component.rb', line 128 def description @description end |
#emoji ⇒ Emoji? (readonly)
131 132 133 |
# File 'lib/rubycord/data/component.rb', line 131 def emoji @emoji end |
#label ⇒ String (readonly)
122 123 124 |
# File 'lib/rubycord/data/component.rb', line 122 def label @label end |
#value ⇒ String (readonly)
125 126 127 |
# File 'lib/rubycord/data/component.rb', line 125 def value @value end |