class Telegram::Params::Message
Attributes
animation[R]
audio[R]
caption[R]
caption_entities[R]
channel_chat_created[R]
chat[R]
connected_website[R]
contact[R]
date[R]
delete_chat_photo[R]
document[R]
edit_date[R]
entities[R]
forward_date[R]
forward_from[R]
forward_from_chat[R]
forward_from_message_id[R]
forward_signature[R]
from[R]
game[R]
group_chat_created[R]
invoice[R]
left_chat_member[R]
location[R]
media_group_id[R]
message_id[R]
migrate_from_chat_id[R]
migrate_to_chat_id[R]
new_chat_members[R]
new_chat_photo[R]
new_chat_title[R]
params[R]
passport_data[R]
photo[R]
pinned_message[R]
reply_to_message[R]
sticker[R]
successful_payment[R]
supergroup_chat_created[R]
text[R]
venue[R]
video[R]
video_note[R]
voice[R]
Public Class Methods
new(params)
click to toggle source
# File lib/telegram/params/message.rb, line 16 def initialize(params) message_params = message_params_permit_from(params) @params = params.require(:message) @message_id = message_params[:message_id] @from = Telegram::Params::From.new(params) @date = message_params[:date] @chat = Telegram::Params::Chat.new(params) @forward_from = Telegram::Params::ForwardFrom.new(params) @forward_from_chat = Telegram::Params::ForwardChat.new(params) @forward_from_message_id = message_params[:forward_from_message_id] @forward_signature = message_params[:forward_signature] @forward_date = message_params[:forward_date] @reply_to_message = message_params[:reply_to_message] @edit_date = message_params[:edit_date] @media_group_id = message_params[:media_group_id] @author_signature = message_params[:author_signature] @text = message_params[:text] @entities = message_params[:entities] @caption_entities = message_params[:caption_entities] @audio = message_params[:audio] @document = message_params[:document] @animation = message_params[:animation] @game = message_params[:game] @photo = message_params[:photo] @sticker = message_params[:sticker] @video = message_params[:video] @voice = message_params[:voice] @video_note = message_params[:video_note] @caption = message_params[:caption] @contact = message_params[:contact] @location = message_params[:location] @venue = message_params[:venue] @new_chat_members = message_params[:new_chat_members] @left_chat_member = message_params[:left_chat_member] @new_chat_title = message_params[:new_chat_title] @new_chat_photo = message_params[:new_chat_photo] @delete_chat_photo = message_params[:delete_chat_photo] @group_chat_created = message_params[:group_chat_created] @supergroup_chat_created = message_params[:supergroup_chat_created] @channel_chat_created = message_params[:channel_chat_created] @migrate_to_chat_id = message_params[:migrate_to_chat_id] @migrate_from_chat_id = message_params[:migrate_from_chat_id] @pinned_message = message_params[:pinned_message] @invoice = message_params[:invoice] @successful_payment = message_params[:successful_payment] @connected_website = message_params[:connected_website] @passport_data = message_params[:passport_data] end
Public Instance Methods
nil?()
click to toggle source
# File lib/telegram/params/message.rb, line 66 def nil? self.instance_variables.map{ |attribute| self.instance_variable_get(attribute) } .map(&:nil?) .reduce(:&) end
Private Instance Methods
message_params_permit_from(params)
click to toggle source
# File lib/telegram/params/message.rb, line 74 def message_params_permit_from(params) params.require(:message) .permit( :message_id, :from, :date, :chat, :forward_from, :forward_from_chat, :forward_from_message_id, :forward_signature, :forward_date, :reply_to_message, :edit_date, :media_group_id, :author_signature, :text, :entities, :caption_entities, :audio, :document, :animation, :game, :photo, :sticker, :video, :voice, :video_note, :caption, :contact, :location, :venue, :new_chat_members, :left_chat_member, :new_chat_title, :new_chat_photo, :delete_chat_photo, :group_chat_created, :supergroup_chat_created, :channel_chat_created, :migrate_to_chat_id, :migrate_from_chat_id, :pinned_message, :invoice, :successful_payment, :connected_website, :passport_data ) end