Class: Telegem::Markup::ReplyKeyboard

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

Instance Method Summary collapse

Constructor Details

#initialize(rows, options = {}) ⇒ ReplyKeyboard

Returns a new instance of ReplyKeyboard.



80
81
82
83
# File 'lib/markup/keyboard.rb', line 80

def initialize(rows, options = {})
  @rows = rows
  @options = options
end

Instance Method Details

#to_hObject



84
85
86
87
88
# File 'lib/markup/keyboard.rb', line 84

def to_h
  {
    keyboard: @rows
}.merge(@options)
end

#to_json(*args) ⇒ Object



89
90
91
# File 'lib/markup/keyboard.rb', line 89

def to_json(*args)
  to_h.to_json(*args)
end