Class: Borneo::Service

Inherits:
Object
  • Object
show all
Defined in:
lib/borneo/service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(proxy, name, version) ⇒ Service

Returns a new instance of Service.



5
6
7
8
9
# File 'lib/borneo/service.rb', line 5

def initialize(proxy, name, version)
  @proxy = proxy
  @name = name
  @version = version
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name) ⇒ Object



23
24
25
# File 'lib/borneo/service.rb', line 23

def method_missing(name)
  Borneo::MethodProxy.new(self, name)
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/borneo/service.rb', line 3

def name
  @name
end

#proxyObject (readonly)

Returns the value of attribute proxy.



3
4
5
# File 'lib/borneo/service.rb', line 3

def proxy
  @proxy
end

#versionObject (readonly)

Returns the value of attribute version.



3
4
5
# File 'lib/borneo/service.rb', line 3

def version
  @version
end

Instance Method Details

#_authorizationObject



15
16
17
# File 'lib/borneo/service.rb', line 15

def _authorization
  @proxy.authorization
end

#_clientObject



11
12
13
# File 'lib/borneo/service.rb', line 11

def _client
  @proxy.google_client
end

#_discovered_serviceObject



19
20
21
# File 'lib/borneo/service.rb', line 19

def _discovered_service
  _client.discovered_api(@name, @version)
end