Class: Evertils::Common::Entity::Notebook
- Defined in:
- lib/evertils/common/entity/notebook.rb
Overview
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #create(name, stack = nil) ⇒ Object
- #default ⇒ Object
-
#expunge ⇒ Object
deprecated
Deprecated.
0.2.9
- #expunge! ⇒ Object
- #find(name) ⇒ Object
- #notes ⇒ 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, stack = nil) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/evertils/common/entity/notebook.rb', line 20 def create(name, stack = nil) @entity = nil notebook = ::Evernote::EDAM::Type::Notebook.new notebook.name = name if !stack.nil? notebook.stack = stack notebook.name = "#{stack}/#{name}" end @entity = @evernote.call(:createNotebook, notebook) self if @entity end |
#default ⇒ Object
38 39 40 41 42 |
# File 'lib/evertils/common/entity/notebook.rb', line 38 def default @entity = @evernote.call(:getDefaultNotebook) self if @entity end |
#expunge ⇒ Object
Deprecated.
0.2.9
53 54 55 56 57 |
# File 'lib/evertils/common/entity/notebook.rb', line 53 def expunge deprecation_notice('0.2.9', 'Replaced with Entity#expunge! Will be removed in 0.4.0.') @evernote.call(:expungeNotebook, @entity.guid) end |
#expunge! ⇒ Object
46 47 48 |
# File 'lib/evertils/common/entity/notebook.rb', line 46 def expunge! @evernote.call(:expungeNotebook, @entity.guid) end |