Class: Borneo::Service
- Inherits:
-
Object
- Object
- Borneo::Service
- Defined in:
- lib/borneo/service.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#proxy ⇒ Object
readonly
Returns the value of attribute proxy.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
- #_authorization ⇒ Object
- #_client ⇒ Object
- #_discovered_service ⇒ Object
-
#initialize(proxy, name, version) ⇒ Service
constructor
A new instance of Service.
- #method_missing(name) ⇒ Object
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
#name ⇒ Object (readonly)
Returns the value of attribute name.
3 4 5 |
# File 'lib/borneo/service.rb', line 3 def name @name end |
#proxy ⇒ Object (readonly)
Returns the value of attribute proxy.
3 4 5 |
# File 'lib/borneo/service.rb', line 3 def proxy @proxy end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
3 4 5 |
# File 'lib/borneo/service.rb', line 3 def version @version end |
Instance Method Details
#_authorization ⇒ Object
15 16 17 |
# File 'lib/borneo/service.rb', line 15 def @proxy. end |
#_client ⇒ Object
11 12 13 |
# File 'lib/borneo/service.rb', line 11 def _client @proxy.google_client end |
#_discovered_service ⇒ Object
19 20 21 |
# File 'lib/borneo/service.rb', line 19 def _discovered_service _client.discovered_api(@name, @version) end |