Class: Twterm::Event::Message::AbstractMessage

Inherits:
AbstractEvent show all
Defined in:
lib/twterm/event/message/abstract_message.rb

Direct Known Subclasses

Error, Info, Success, Warning

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

check_type

Constructor Details

#initialize(message) ⇒ AbstractMessage

Returns a new instance of AbstractMessage.



9
10
11
12
13
# File 'lib/twterm/event/message/abstract_message.rb', line 9

def initialize(message)
  super(CGI.unescapeHTML(message))

  @time = Time.now
end

Instance Attribute Details

#timeObject (readonly)

Returns the value of attribute time.



7
8
9
# File 'lib/twterm/event/message/abstract_message.rb', line 7

def time
  @time
end

Instance Method Details

#fieldsObject



15
16
17
18
19
# File 'lib/twterm/event/message/abstract_message.rb', line 15

def fields
  {
    body: String
  }
end