Class: Evertils::Common::Entity::Tag
- Defined in:
- lib/evertils/common/entity/tag.rb
Overview
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #create(name) ⇒ Object
-
#expunge(name) ⇒ Object
deprecated
Deprecated.
0.2.9
- #expunge! ⇒ Object
- #find(name) ⇒ Object
Methods inherited from Base
#end_of_day, #initialize, #placeholders_for, #prop, #start_of_day, #symbolize_keys, #to_s
Methods inherited from Generic
#bytesize, #deprecation_notice, #encoding, #force_encoding, #has_required_fields, #initialize
Constructor Details
This class inherits a constructor from Evertils::Common::Entity::Base
Instance Method Details
#create(name) ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/evertils/common/entity/tag.rb', line 18 def create(name) tag = ::Evernote::EDAM::Type::Tag.new tag.name = name @entity = @evernote.call(:createTag, tag) self if @entity end |
#expunge(name) ⇒ Object
Deprecated.
0.2.9
36 37 38 39 40 41 |
# File 'lib/evertils/common/entity/tag.rb', line 36 def expunge(name) deprecation_notice('0.2.9', 'Replaced with Entity#expunge! Will be removed in 0.4.0.') tag = find(name) @evernote.call(:expungeTag, tag.guid) end |
#expunge! ⇒ Object
29 30 31 |
# File 'lib/evertils/common/entity/tag.rb', line 29 def expunge! @evernote.call(:expungeTag, @entity.guid) end |