Created
October 31, 2012 07:16
-
-
Save jeremyd/3985578 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.load_preferences | |
e = getPreferences(Context::MODE_PRIVATE) | |
email = e.getString("Email", "") | |
pass = e.getString("Password", "") | |
host = e.getString("RightScale Host", "") | |
account_id = e.getString("Account ID", "") | |
return { :email => email, :pass => pass, :host => host, :account_id => account_id } | |
end | |
def self.save_preferences(options) | |
e = getPreferences(Context::MODE_PRIVATE).edit | |
e.putString("Email", options[:email]) | |
e.putString("Password", options[:pass]) | |
e.putString("RightScale Host", options[:host]) | |
e.putString("Account ID", options[:account_id]) | |
e.commit | |
toast "Saved Settings" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment