Class: Netbout::Message

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

Overview

Message.

Author

Yegor Bugayenko ([email protected])

Copyright

Copyright © 2024 Yegor Bugayenko

License

MIT

Instance Method Summary collapse

Constructor Details

#initialize(iri, token, json) ⇒ Message

Returns a new instance of Message.



29
30
31
32
33
# File 'lib/netbout/message.rb', line 29

def initialize(iri, token, json)
  @iri = iri
  @token = token
  @json = json
end

Instance Method Details

#attach(flag) ⇒ Object



51
# File 'lib/netbout/message.rb', line 51

def attach(flag); end

#authorObject



39
40
41
# File 'lib/netbout/message.rb', line 39

def author
  @json['author']
end

#detach(flag) ⇒ Object



53
# File 'lib/netbout/message.rb', line 53

def detach(flag); end

#flagsObject



47
48
49
# File 'lib/netbout/message.rb', line 47

def flags
  []
end

#idObject



35
36
37
# File 'lib/netbout/message.rb', line 35

def id
  @json['id'].to_i
end

#textObject



43
44
45
# File 'lib/netbout/message.rb', line 43

def text
  @json['text']
end