Class: ReplyKeyboardMarkup
- Inherits:
-
Object
- Object
- ReplyKeyboardMarkup
- Defined in:
- lib/telegramObjects.rb
Instance Attribute Summary collapse
-
#keyboard ⇒ Object
Returns the value of attribute keyboard.
-
#one_time_keyboard ⇒ Object
Returns the value of attribute one_time_keyboard.
-
#resize_keyboard ⇒ Object
Returns the value of attribute resize_keyboard.
-
#selective ⇒ Object
Returns the value of attribute selective.
Instance Method Summary collapse
-
#initialize(json) ⇒ ReplyKeyboardMarkup
constructor
A new instance of ReplyKeyboardMarkup.
- #to_json ⇒ Object
Constructor Details
#initialize(json) ⇒ ReplyKeyboardMarkup
Returns a new instance of ReplyKeyboardMarkup.
178 179 180 181 182 183 184 |
# File 'lib/telegramObjects.rb', line 178 def initialize json return if !json @keyboard = json["keyboard"] @resize_keyboard = json["resize_keyboard"] @one_time_keyboard = json["one_time_keyboard"] @selective = json["selective"] end |
Instance Attribute Details
#keyboard ⇒ Object
Returns the value of attribute keyboard.
177 178 179 |
# File 'lib/telegramObjects.rb', line 177 def keyboard @keyboard end |
#one_time_keyboard ⇒ Object
Returns the value of attribute one_time_keyboard.
177 178 179 |
# File 'lib/telegramObjects.rb', line 177 def one_time_keyboard @one_time_keyboard end |
#resize_keyboard ⇒ Object
Returns the value of attribute resize_keyboard.
177 178 179 |
# File 'lib/telegramObjects.rb', line 177 def resize_keyboard @resize_keyboard end |
#selective ⇒ Object
Returns the value of attribute selective.
177 178 179 |
# File 'lib/telegramObjects.rb', line 177 def selective @selective end |
Instance Method Details
#to_json ⇒ Object
186 187 188 |
# File 'lib/telegramObjects.rb', line 186 def to_json "{\"keyboard\":" + @keyboard.to_json + ", \"resize_keyboard\":" + (!@resize_keyboard ? "false" : "true") + ", \"one_time_keyboard\":" + (!@one_time_keyboard ? "false" : "true") + ", \"selective\":" + (!@selective ? "false" : "true") + "}" end |