Class: Skypescraper::Message
- Inherits:
-
Object
- Object
- Skypescraper::Message
- Defined in:
- lib/skypescraper/message.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#identity ⇒ Object
readonly
Returns the value of attribute identity.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(identity, text, type, created_at) ⇒ Message
constructor
A new instance of Message.
Constructor Details
#initialize(identity, text, type, created_at) ⇒ Message
Returns a new instance of Message.
7 8 9 10 11 12 |
# File 'lib/skypescraper/message.rb', line 7 def initialize(identity, text, type, created_at) @identity = identity @text = text @type = type @created_at = DateTime.strptime(created_at.to_s, '%s') end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/skypescraper/message.rb', line 5 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/skypescraper/message.rb', line 5 def id @id end |
#identity ⇒ Object (readonly)
Returns the value of attribute identity.
5 6 7 |
# File 'lib/skypescraper/message.rb', line 5 def identity @identity end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/skypescraper/message.rb', line 5 def text @text end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/skypescraper/message.rb', line 5 def type @type end |