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

Instance Attribute Details

#anki21_databaseObject (readonly)

:nodoc:



6
7
8
# File 'lib/anki_record/note/note_attributes.rb', line 6

def anki21_database
  @anki21_database
end

#cardsObject (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

#dataObject (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

#deckObject (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_contentsObject (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

#flagsObject (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

#guidObject

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

#idObject (readonly)

The note’s id



10
11
12
# File 'lib/anki_record/note/note_attributes.rb', line 10

def id
  @id
end

#last_modified_timestampObject (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
  @last_modified_timestamp
end

#note_typeObject (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

#tagsObject (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
  @tags
end

#usnObject (readonly)

The note’s update sequence number



25
26
27
# File 'lib/anki_record/note/note_attributes.rb', line 25

def usn
  @usn
end