Class: Google::Civic::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/google-civic/connection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Parameters:

  • value

    the value to set the attribute base_url to.



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