Class: Australium::PlayerSay
- Defined in:
- lib/australium/events/player_say.rb
Constant Summary collapse
- LOG_REGEX =
/"(?<player>.+)" say(?<team>_team)? "(?<message>.+)"/
Constants inherited from Event
Event::PROPERTY_REGEX, Event::TIMESTAMP_REGEX
Instance Attribute Summary collapse
-
#message ⇒ String
The message spoken.
-
#player ⇒ Player
The Player who spoke in chat.
Attributes inherited from Event
Instance Method Summary collapse
-
#initialize(data) ⇒ PlayerSay
constructor
A new instance of PlayerSay.
-
#team? ⇒ Boolean
Checks if the message was a team-only message.
Methods inherited from Event
Constructor Details
#initialize(data) ⇒ PlayerSay
Returns a new instance of PlayerSay.
11 12 13 14 |
# File 'lib/australium/events/player_say.rb', line 11 def initialize(data) super(data) self[:team] = team.eql?('_team') end |
Instance Attribute Details
#message ⇒ String
Returns the message spoken.
11 12 13 14 |
# File 'lib/australium/events/player_say.rb', line 11 def initialize(data) super(data) self[:team] = team.eql?('_team') end |
#player ⇒ Player
Returns the Australium::Player who spoke in chat.
11 12 13 14 |
# File 'lib/australium/events/player_say.rb', line 11 def initialize(data) super(data) self[:team] = team.eql?('_team') end |
Instance Method Details
#team? ⇒ Boolean
Checks if the message was a team-only message.
18 |
# File 'lib/australium/events/player_say.rb', line 18 def team? ; team end |