Class: ReplyKeyboardMarkup

Inherits:
Object
  • Object
show all
Defined in:
lib/telegramObjects.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyboardObject

Returns the value of attribute keyboard.



177
178
179
# File 'lib/telegramObjects.rb', line 177

def keyboard
  @keyboard
end

#one_time_keyboardObject

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_keyboardObject

Returns the value of attribute resize_keyboard.



177
178
179
# File 'lib/telegramObjects.rb', line 177

def resize_keyboard
  @resize_keyboard
end

#selectiveObject

Returns the value of attribute selective.



177
178
179
# File 'lib/telegramObjects.rb', line 177

def selective
  @selective
end

Instance Method Details

#to_jsonObject



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