Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/telegram_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
require "telegram_bot/user"
require "telegram_bot/group_chat"
require "telegram_bot/channel"
require "telegram_bot/location"
require "telegram_bot/message"
require "telegram_bot/keyboard"
require "telegram_bot/reply_keyboard_hide"
Expand Down
11 changes: 11 additions & 0 deletions lib/telegram_bot/location.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module TelegramBot
class Location
include Virtus.model
attribute :latitude, Float
attribute :longitude, Float

def full
[latitude, longitude]
end
end
end
1 change: 1 addition & 0 deletions lib/telegram_bot/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Message
attribute :date, DateTime
attribute :chat, Channel
attribute :reply_to_message, Message
attribute :location, Location

def reply(&block)
reply = OutMessage.new(chat: chat)
Expand Down