Class: Telegem::Markup::InlineKeyboard

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(rows) ⇒ InlineKeyboard

Returns a new instance of InlineKeyboard.



86
87
88
# File 'lib/markup/inline.rb', line 86

def initialize(rows)
  @rows = rows
end

Instance Attribute Details

#rowsObject (readonly)

Returns the value of attribute rows.



85
86
87
# File 'lib/markup/inline.rb', line 85

def rows
  @rows
end

Instance Method Details

#to_hObject



89
90
91
92
93
# File 'lib/markup/inline.rb', line 89

def to_h
  {
    inline_keyboard: @rows
  }
end

#to_json(*args) ⇒ Object



94
95
96
# File 'lib/markup/inline.rb', line 94

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