Class: NineteenNinetynine::Event::Note
- Inherits:
-
Object
- Object
- NineteenNinetynine::Event::Note
- Defined in:
- lib/nineteen_ninetynine/event/note.rb
Instance Attribute Summary collapse
-
#_mark ⇒ Object
Returns the value of attribute _mark.
-
#_stream ⇒ Object
Returns the value of attribute _stream.
-
#body ⇒ Object
Returns the value of attribute body.
-
#date ⇒ Object
Returns the value of attribute date.
-
#pubkey ⇒ Object
Returns the value of attribute pubkey.
-
#raw ⇒ Object
Returns the value of attribute raw.
-
#sig ⇒ Object
Returns the value of attribute sig.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(content) ⇒ Note
constructor
A new instance of Note.
Constructor Details
#initialize(content) ⇒ Note
Returns a new instance of Note.
5 6 7 8 9 10 11 12 13 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 5 def initialize(content) @raw = content @body = content["content"] @pubkey = content["pubkey"] @date = Time.at content["created_at"] @_mark = nil @_stream = true @sig = content["sig"] end |
Instance Attribute Details
#_mark ⇒ Object
Returns the value of attribute _mark.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def _mark @_mark end |
#_stream ⇒ Object
Returns the value of attribute _stream.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def _stream @_stream end |
#body ⇒ Object
Returns the value of attribute body.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def body @body end |
#date ⇒ Object
Returns the value of attribute date.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def date @date end |
#pubkey ⇒ Object
Returns the value of attribute pubkey.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def pubkey @pubkey end |
#raw ⇒ Object
Returns the value of attribute raw.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def raw @raw end |
#sig ⇒ Object
Returns the value of attribute sig.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def sig @sig end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/nineteen_ninetynine/event/note.rb', line 4 def user @user end |