Class: Log4ever::Tag
- Inherits:
-
Object
- Object
- Log4ever::Tag
- Defined in:
- lib/log4r/evernote.rb
Instance Method Summary collapse
-
#get ⇒ Object
get tag objects.
-
#initialize(note, auth_store) ⇒ Tag
constructor
A new instance of Tag.
-
#names=(list) ⇒ Object
set tag list.
Constructor Details
#initialize(note, auth_store) ⇒ Tag
Returns a new instance of Tag.
236 237 238 239 |
# File 'lib/log4r/evernote.rb', line 236 def initialize(note, auth_store) @note = note @auth_store = auth_store end |
Instance Method Details
#get ⇒ Object
get tag objects
248 249 250 251 252 253 254 255 256 257 |
# File 'lib/log4r/evernote.rb', line 248 def get return if @list.nil? || @list.empty? return @tag_guids unless @tag_guids.nil? @list = [@list] unless @list.kind_of?(Array) @tags = @auth_store.note_store.listTags(@auth_store.auth_token) if @tags.nil? @tag_guids = @list.map do |tag| tag_obj = to_obj(tag) || create(tag) tag_obj.guid end end |
#names=(list) ⇒ Object
set tag list
242 243 244 245 |
# File 'lib/log4r/evernote.rb', line 242 def names=(list) @list = list @tag_guids = nil end |