Exception: Ruboty::SlackTakeTurns::Actions::Base::ActionBaseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/ruboty/slack_take_turns/actions/base.rb

Direct Known Subclasses

CurrentUserNotFound, UserNotFound

Instance Method Summary collapse

Constructor Details

#initialize(chat_message: nil, user_id: nil, user_name: nil) ⇒ ActionBaseError

Returns a new instance of ActionBaseError.



65
66
67
68
69
# File 'lib/ruboty/slack_take_turns/actions/base.rb', line 65

def initialize(chat_message: nil, user_id: nil, user_name: nil)
  @chat_message = chat_message
  @user_id = user_id
  @user_name = user_name
end

Instance Method Details

#to_sObject



71
72
73
74
75
76
77
# File 'lib/ruboty/slack_take_turns/actions/base.rb', line 71

def to_s
  <<~"EOF"
  #{self.class.to_s}
  user_id:#{@user_id}, user_name:#{@user_name}, from:#{@chat_message.from_name}, channel:#{@chat_message.to}, body:#{@chat_message.body}
  #{backtrace.take(4).join("\n")}
  EOF
end