Module: AnkiRecord::NoteAttributes
- Included in:
- Note
- Defined in:
- lib/anki_record/note/note_attributes.rb
Overview
Module with Note’s attribute readers, writers, and accessors.
Instance Attribute Summary collapse
-
#anki21_database ⇒ Object
readonly
:nodoc:.
-
#cards ⇒ Object
readonly
The note’s card objects, as an array.
-
#data ⇒ Object
readonly
Corresponds to the data column in the collection.anki21 notes table.
-
#deck ⇒ Object
readonly
The note’s deck.
-
#field_contents ⇒ Object
readonly
The note’s field contents as a hash.
-
#flags ⇒ Object
readonly
Corresponds to the flags column in the collection.anki21 notes table.
-
#guid ⇒ Object
The note’s globally unique id.
-
#id ⇒ Object
readonly
The note’s id.
-
#last_modified_timestamp ⇒ Object
readonly
The number of seconds since the 1970 epoch when the note was last modified.
-
#note_type ⇒ Object
readonly
The note’s note type.
-
#tags ⇒ Object
readonly
The note’s tags, as an array of strings.
-
#usn ⇒ Object
readonly
The note’s update sequence number.
Instance Attribute Details
#anki21_database ⇒ Object (readonly)
:nodoc:
6 7 8 |
# File 'lib/anki_record/note/note_attributes.rb', line 6 def anki21_database @anki21_database end |
#cards ⇒ Object (readonly)
The note’s card objects, as an array
47 48 49 |
# File 'lib/anki_record/note/note_attributes.rb', line 47 def cards @cards end |
#data ⇒ Object (readonly)
Corresponds to the data column in the collection.anki21 notes table
55 56 57 |
# File 'lib/anki_record/note/note_attributes.rb', line 55 def data @data end |
#deck ⇒ Object (readonly)
The note’s deck.
When the note is saved, the note will belong to this deck
39 40 41 |
# File 'lib/anki_record/note/note_attributes.rb', line 39 def deck @deck end |
#field_contents ⇒ Object (readonly)
The note’s field contents as a hash
33 34 35 |
# File 'lib/anki_record/note/note_attributes.rb', line 33 def field_contents @field_contents end |
#flags ⇒ Object (readonly)
Corresponds to the flags column in the collection.anki21 notes table
51 52 53 |
# File 'lib/anki_record/note/note_attributes.rb', line 51 def flags @flags end |
#guid ⇒ Object
The note’s globally unique id
This is used by Anki to match an imported note to an existing note and update it rather than duplicate the note.
17 18 19 |
# File 'lib/anki_record/note/note_attributes.rb', line 17 def guid @guid end |
#id ⇒ Object (readonly)
The note’s id
10 11 12 |
# File 'lib/anki_record/note/note_attributes.rb', line 10 def id @id end |
#last_modified_timestamp ⇒ Object (readonly)
The number of seconds since the 1970 epoch when the note was last modified.
21 22 23 |
# File 'lib/anki_record/note/note_attributes.rb', line 21 def @last_modified_timestamp end |
#note_type ⇒ Object (readonly)
The note’s note type
43 44 45 |
# File 'lib/anki_record/note/note_attributes.rb', line 43 def note_type @note_type end |
#tags ⇒ Object (readonly)
The note’s tags, as an array of strings
29 30 31 |
# File 'lib/anki_record/note/note_attributes.rb', line 29 def @tags end |
#usn ⇒ Object (readonly)
The note’s update sequence number
25 26 27 |
# File 'lib/anki_record/note/note_attributes.rb', line 25 def usn @usn end |