Class: TelegramOnSteroids::Keyboard::Row
- Inherits:
-
Object
- Object
- TelegramOnSteroids::Keyboard::Row
- Defined in:
- lib/telegram_on_steroids/keyboard/row.rb
Instance Attribute Summary collapse
-
#buttons ⇒ Object
readonly
Returns the value of attribute buttons.
-
#keyboard ⇒ Object
readonly
Returns the value of attribute keyboard.
Instance Method Summary collapse
- #button(**button) ⇒ Object
-
#initialize(keyboard:) ⇒ Row
constructor
A new instance of Row.
Constructor Details
#initialize(keyboard:) ⇒ Row
Returns a new instance of Row.
2 3 4 5 |
# File 'lib/telegram_on_steroids/keyboard/row.rb', line 2 def initialize(keyboard:) @buttons = [] @keyboard = keyboard end |
Instance Attribute Details
#buttons ⇒ Object (readonly)
Returns the value of attribute buttons.
11 12 13 |
# File 'lib/telegram_on_steroids/keyboard/row.rb', line 11 def @buttons end |
#keyboard ⇒ Object (readonly)
Returns the value of attribute keyboard.
11 12 13 |
# File 'lib/telegram_on_steroids/keyboard/row.rb', line 11 def keyboard @keyboard end |
Instance Method Details
#button(**button) ⇒ Object
7 8 9 |
# File 'lib/telegram_on_steroids/keyboard/row.rb', line 7 def (**) .push(TelegramOnSteroids::Keyboard::Button.new(**, keyboard:).to_telegram_format) end |