Class: Telegram::Bot::Types::KeyboardButton
- Inherits:
-
Object
- Object
- Telegram::Bot::Types::KeyboardButton
- Defined in:
- lib/telegram/bot/types/keyboard_button.rb
Instance Attribute Summary collapse
-
#request_contact ⇒ Object
Returns the value of attribute request_contact.
-
#request_location ⇒ Object
Returns the value of attribute request_location.
-
#text ⇒ Object
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ KeyboardButton
constructor
A new instance of KeyboardButton.
Constructor Details
#initialize(attributes) ⇒ KeyboardButton
Returns a new instance of KeyboardButton.
7 8 9 |
# File 'lib/telegram/bot/types/keyboard_button.rb', line 7 def initialize(attributes) attributes.each { |k, v| self.send("#{k}=", v) if self.respond_to? k } end |
Instance Attribute Details
#request_contact ⇒ Object
Returns the value of attribute request_contact.
3 4 5 |
# File 'lib/telegram/bot/types/keyboard_button.rb', line 3 def request_contact @request_contact end |
#request_location ⇒ Object
Returns the value of attribute request_location.
3 4 5 |
# File 'lib/telegram/bot/types/keyboard_button.rb', line 3 def request_location @request_location end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/telegram/bot/types/keyboard_button.rb', line 3 def text @text end |