Class: TelegramConfig

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

Overview

Telegram config

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token) ⇒ TelegramConfig

Returns a new instance of TelegramConfig.



7
8
9
10
# File 'lib/telerb/telegram_config.rb', line 7

def initialize(token)
  @offset = nil
  @token = token
end

Instance Attribute Details

#offsetObject

Returns the value of attribute offset.



5
6
7
# File 'lib/telerb/telegram_config.rb', line 5

def offset
  @offset
end

Instance Method Details

#base_uri(method) ⇒ Object



12
13
14
# File 'lib/telerb/telegram_config.rb', line 12

def base_uri(method)
  "https://api.telegram.org/bot#{@token}/#{method}"
end