Class: Google::Civic::Connection
- Inherits:
-
Object
- Object
- Google::Civic::Connection
- Defined in:
- lib/google-civic/connection.rb
Instance Attribute Summary collapse
-
#base_url ⇒ Object
writeonly
Sets the attribute base_url.
Instance Method Summary collapse
- #get(*args, &block) ⇒ Object
-
#initialize(params = {}) ⇒ Connection
constructor
A new instance of Connection.
- #post(*args, &block) ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ Connection
Returns a new instance of Connection.
9 10 11 12 |
# File 'lib/google-civic/connection.rb', line 9 def initialize(params={}) @base_url = params.delete(:base_url) establish! end |
Instance Attribute Details
#base_url=(value) ⇒ Object
Sets the attribute base_url
7 8 9 |
# File 'lib/google-civic/connection.rb', line 7 def base_url=(value) @base_url = value end |
Instance Method Details
#get(*args, &block) ⇒ Object
14 15 16 |
# File 'lib/google-civic/connection.rb', line 14 def get(*args, &block) resource.get(*args, &block) end |
#post(*args, &block) ⇒ Object
18 19 20 |
# File 'lib/google-civic/connection.rb', line 18 def post(*args, &block) resource.post(*args, &block) end |