Class: ForceReply

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ ForceReply

Returns a new instance of ForceReply.



206
207
208
209
210
# File 'lib/telegramObjects.rb', line 206

def initialize json
  return if !json
  @force_reply = json["force_reply"]
  @selective = json["selective"]
end

Instance Attribute Details

#force_replyObject

Returns the value of attribute force_reply.



205
206
207
# File 'lib/telegramObjects.rb', line 205

def force_reply
  @force_reply
end

#selectiveObject

Returns the value of attribute selective.



205
206
207
# File 'lib/telegramObjects.rb', line 205

def selective
  @selective
end

Instance Method Details

#to_jsonObject



212
213
214
# File 'lib/telegramObjects.rb', line 212

def to_json
  "{\"force_reply\":true, \"selective\":"+(!@selective ? "false" : "true")+"}"
end