Class: Log4ever::Tag
Instance Method Summary collapse
-
#clear ⇒ Object
clear note object.
-
#get ⇒ Object
get tag objects.
-
#get! ⇒ Object
get newest tag objects.
-
#initialize(note) ⇒ Tag
constructor
A new instance of Tag.
-
#names=(list) ⇒ Object
set tag list.
Methods inherited from Evernote
#note, #notebook, #tag, #to_ascii
Constructor Details
#initialize(note) ⇒ Tag
Returns a new instance of Tag.
241 242 243 |
# File 'lib/log4r/evernote.rb', line 241 def initialize(note) @note = note end |
Instance Method Details
#clear ⇒ Object
clear note object
270 271 272 273 |
# File 'lib/log4r/evernote.rb', line 270 def clear = nil @tag_guids = nil end |
#get ⇒ Object
get tag objects
252 253 254 255 256 257 258 259 260 261 |
# File 'lib/log4r/evernote.rb', line 252 def get return if @list.nil? || @list.empty? return @tag_guids unless @tag_guids.nil? @list = [@list] unless @list.kind_of?(Array) = @@note_store.listTags(@@auth_token) if .nil? @tag_guids = @list.map do |tag| tag_obj = to_obj(tag) || create(tag) tag_obj.guid end end |
#get! ⇒ Object
get newest tag objects
264 265 266 267 |
# File 'lib/log4r/evernote.rb', line 264 def get! clear get end |
#names=(list) ⇒ Object
set tag list
246 247 248 249 |
# File 'lib/log4r/evernote.rb', line 246 def names=(list) @list = list @tag_guids = nil end |