Class: TelegramBot::Location

Inherits:
Struct
  • Object
show all
Includes:
AutoFromMethods
Defined in:
lib/telegram_bot/location.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods included from AutoFromMethods

included

Instance Attribute Details

#latitudeObject

Returns the value of attribute latitude

Returns:

  • (Object)

    the current value of latitude



3
4
5
# File 'lib/telegram_bot/location.rb', line 3

def latitude
  @latitude
end

#longitudeObject

Returns the value of attribute longitude

Returns:

  • (Object)

    the current value of longitude



3
4
5
# File 'lib/telegram_bot/location.rb', line 3

def longitude
  @longitude
end

Class Method Details

.from(hsh, lat = nil) ⇒ Object



6
7
8
9
10
11
12
13
# File 'lib/telegram_bot/location.rb', line 6

def self.from(hsh, lat = nil)
  case hsh
  when Integer
    new(hsh, lat)
  else
    super(hsh)
  end
end