Class: Everlog::Dom::Module::Evernote
- Inherits:
-
Everlog::Dom::Module
- Object
- Everlog::Dom::Module
- Everlog::Dom::Module::Evernote
- Defined in:
- lib/everlog/dom/module/evernote.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(is_sandbox) ⇒ Evernote
constructor
A new instance of Evernote.
- #save(title, content) ⇒ Object
Constructor Details
#initialize(is_sandbox) ⇒ Evernote
Returns a new instance of Evernote.
3 4 5 6 |
# File 'lib/everlog/dom/module/evernote.rb', line 3 def initialize is_sandbox @is_sandbox = is_sandbox super() end |
Class Method Details
.publish(title, content, output) ⇒ Object
13 14 15 16 |
# File 'lib/everlog/dom/module/evernote.rb', line 13 def publish(title, content, output) is_sandbox = output != 'production' self.new(is_sandbox).save(title, content) end |
Instance Method Details
#save(title, content) ⇒ Object
8 9 10 |
# File 'lib/everlog/dom/module/evernote.rb', line 8 def save(title, content) Dom::Repository::Evernote.new(@is_sandbox, @config).save(title, content) end |