Class: Evertils::Controller::Change
- Defined in:
- lib/evertils/controllers/change.rb
Constant Summary collapse
- REQUIRED_TOKEN_GROUPS =
[:S, :U, :E, :C, :P, :A, :V, :H].freeze
- CONFIG =
File.('~/.evertils/config.yml')
- ERROR_MESSAGE =
"Token invalid\nGet one from https://www.evernote.com/Login.action?targetUrl=%2Fapi%2FDeveloperToken.action".freeze
Constants inherited from Base
Base::OK, Base::QUIT, Base::QUIT_SOFT
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#token ⇒ Object
Change the defined Evernote token.
Methods inherited from Base
#can_exec?, #exec, #initialize, #post_exec, #pre_exec, #sample
Constructor Details
This class inherits a constructor from Evertils::Controller::Base
Instance Method Details
#token ⇒ Object
Change the defined Evernote token
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/evertils/controllers/change.rb', line 11 def token Notify.spit 'Already have your Evernote token? Paste it now:' begin set_evertils_token rescue RuntimeError Notify.error ERROR_MESSAGE rescue Interrupt Notify.error ERROR_MESSAGE end Notify.success('Token saved!') end |