Class: QuiverToolbox::API::CreateNote
- Inherits:
-
Object
- Object
- QuiverToolbox::API::CreateNote
- Defined in:
- lib/quiver_toolbox/api.rb
Instance Attribute Summary collapse
-
#note ⇒ Object
readonly
Returns the value of attribute note.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(title, body, attr) ⇒ CreateNote
constructor
A new instance of CreateNote.
- #store ⇒ Object
Constructor Details
#initialize(title, body, attr) ⇒ CreateNote
Returns a new instance of CreateNote.
34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/quiver_toolbox/api.rb', line 34 def initialize(title, body, attr) @result = nil @note = QuiverToolbox::Note.new(attr) @note.file = File.join(attr['notebook_path'], @note.file_name) @note.title = title @note.cells = [ { 'type' => attr['type'], 'data' => body } ] end |
Instance Attribute Details
#note ⇒ Object (readonly)
Returns the value of attribute note.
33 34 35 |
# File 'lib/quiver_toolbox/api.rb', line 33 def note @note end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
33 34 35 |
# File 'lib/quiver_toolbox/api.rb', line 33 def result @result end |
Instance Method Details
#exec ⇒ Object
47 48 49 |
# File 'lib/quiver_toolbox/api.rb', line 47 def exec self end |
#store ⇒ Object
51 52 53 54 55 |
# File 'lib/quiver_toolbox/api.rb', line 51 def store @note.store @result = @note.file self end |