Class: GoogleText::Configuration
- Inherits:
-
Object
- Object
- GoogleText::Configuration
- Defined in:
- lib/google_text/configuration.rb
Constant Summary collapse
- DEFAULTS =
{ :login_url => 'https://accounts.google.com/ServiceLoginAuth', :dashboard_url => 'https://www.google.com/voice', :mark_as_read_url => 'https://www.google.com/voice/inbox/mark', :inbox_url => 'https://www.google.com/voice/inbox/recent', :send_url => 'https://www.google.com/voice/sms/send', :service => 'grandcentral', :user_agent => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2', }
Instance Attribute Summary collapse
-
#dashboard_url ⇒ Object
Returns the value of attribute dashboard_url.
-
#email ⇒ Object
Returns the value of attribute email.
-
#inbox_url ⇒ Object
Returns the value of attribute inbox_url.
-
#login_url ⇒ Object
Returns the value of attribute login_url.
-
#mark_as_read_url ⇒ Object
Returns the value of attribute mark_as_read_url.
-
#password ⇒ Object
Returns the value of attribute password.
-
#send_url ⇒ Object
Returns the value of attribute send_url.
-
#service ⇒ Object
Returns the value of attribute service.
-
#user_agent ⇒ Object
Returns the value of attribute user_agent.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Configuration
constructor
A new instance of Configuration.
- #reset! ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Configuration
Returns a new instance of Configuration.
15 16 17 18 19 |
# File 'lib/google_text/configuration.rb', line 15 def initialize(={}) DEFAULTS.each do |key,value| self.send("#{key}=", [key] || value) end end |
Instance Attribute Details
#dashboard_url ⇒ Object
Returns the value of attribute dashboard_url.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def dashboard_url @dashboard_url end |
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def email @email end |
#inbox_url ⇒ Object
Returns the value of attribute inbox_url.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def inbox_url @inbox_url end |
#login_url ⇒ Object
Returns the value of attribute login_url.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def login_url @login_url end |
#mark_as_read_url ⇒ Object
Returns the value of attribute mark_as_read_url.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def mark_as_read_url @mark_as_read_url end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def password @password end |
#send_url ⇒ Object
Returns the value of attribute send_url.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def send_url @send_url end |
#service ⇒ Object
Returns the value of attribute service.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def service @service end |
#user_agent ⇒ Object
Returns the value of attribute user_agent.
3 4 5 |
# File 'lib/google_text/configuration.rb', line 3 def user_agent @user_agent end |
Instance Method Details
#reset! ⇒ Object
21 22 23 24 25 |
# File 'lib/google_text/configuration.rb', line 21 def reset! DEFAULTS.each do |key,value| self.send("#{key}=", value) end end |