Class: Skypescraper::Message

Inherits:
Object
  • Object
show all
Defined in:
lib/skypescraper/message.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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