Class: GoogleText::Configuration

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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(options={})
  DEFAULTS.each do |key,value|
    self.send("#{key}=", options[key] || value)
  end
end

Instance Attribute Details

#dashboard_urlObject

Returns the value of attribute dashboard_url.



3
4
5
# File 'lib/google_text/configuration.rb', line 3

def dashboard_url
  @dashboard_url
end

#emailObject

Returns the value of attribute email.



3
4
5
# File 'lib/google_text/configuration.rb', line 3

def email
  @email
end

#inbox_urlObject

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_urlObject

Returns the value of attribute login_url.



3
4
5
# File 'lib/google_text/configuration.rb', line 3

def 
  @login_url
end

#mark_as_read_urlObject

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

#passwordObject

Returns the value of attribute password.



3
4
5
# File 'lib/google_text/configuration.rb', line 3

def password
  @password
end

#send_urlObject

Returns the value of attribute send_url.



3
4
5
# File 'lib/google_text/configuration.rb', line 3

def send_url
  @send_url
end

#serviceObject

Returns the value of attribute service.



3
4
5
# File 'lib/google_text/configuration.rb', line 3

def service
  @service
end

#user_agentObject

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