Class: NineteenNinetynine::Event::Note

Inherits:
Object
  • Object
show all
Defined in:
lib/nineteen_ninetynine/event/note.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#_markObject

Returns the value of attribute _mark.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def _mark
  @_mark
end

#_streamObject

Returns the value of attribute _stream.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def _stream
  @_stream
end

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def body
  @body
end

#dateObject

Returns the value of attribute date.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def date
  @date
end

#pubkeyObject

Returns the value of attribute pubkey.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def pubkey
  @pubkey
end

#rawObject

Returns the value of attribute raw.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def raw
  @raw
end

#sigObject

Returns the value of attribute sig.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def sig
  @sig
end

#userObject

Returns the value of attribute user.



4
5
6
# File 'lib/nineteen_ninetynine/event/note.rb', line 4

def user
  @user
end