Class: Tramway::Bots::Telegram::Custom::Scenario

Inherits:
Object
  • Object
show all
Includes:
Info, MessagesManager
Defined in:
lib/tramway/bots/telegram/custom/scenario.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Info

#channel_from, #chat_from, #user_from

Methods included from MessagesManager

#log_message, #message_to_chat, #message_to_user, #send_file

Constructor Details

#initialize(**options) ⇒ Scenario

Returns a new instance of Scenario.



9
10
11
12
13
14
15
16
# File 'lib/tramway/bots/telegram/custom/scenario.rb', line 9

def initialize(**options)
  @bot = options[:bot]
  @message_from_telegram = options[:message]
  @bot_record = options[:bot_record]
  @chat = options[:chat]
  @message = options[:message_object]
  @user = options[:user]
end

Instance Attribute Details

#botObject (readonly)

Returns the value of attribute bot.



7
8
9
# File 'lib/tramway/bots/telegram/custom/scenario.rb', line 7

def bot
  @bot
end

#bot_recordObject (readonly)

Returns the value of attribute bot_record.



7
8
9
# File 'lib/tramway/bots/telegram/custom/scenario.rb', line 7

def bot_record
  @bot_record
end

#chatObject (readonly)

Returns the value of attribute chat.



7
8
9
# File 'lib/tramway/bots/telegram/custom/scenario.rb', line 7

def chat
  @chat
end

#messageObject (readonly)

Returns the value of attribute message.



7
8
9
# File 'lib/tramway/bots/telegram/custom/scenario.rb', line 7

def message
  @message
end

#message_from_telegramObject (readonly)

Returns the value of attribute message_from_telegram.



7
8
9
# File 'lib/tramway/bots/telegram/custom/scenario.rb', line 7

def message_from_telegram
  @message_from_telegram
end

#userObject (readonly)

Returns the value of attribute user.



7
8
9
# File 'lib/tramway/bots/telegram/custom/scenario.rb', line 7

def user
  @user
end