Class: Garage::Meta::RemoteService
- Inherits:
-
Object
- Object
- Garage::Meta::RemoteService
- Includes:
- Authorizable, Representer
- Defined in:
- lib/garage/meta/remote_service.rb
Defined Under Namespace
Classes: Config, ServiceDSL
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#name ⇒ Object
Returns the value of attribute name.
-
#namespace ⇒ Object
Returns the value of attribute namespace.
Attributes included from Representer
#params, #partial, #representer_attrs, #selector
Class Method Summary collapse
- .all ⇒ Object
- .build_permissions(perms, other, target) ⇒ Object
- .configuration ⇒ Object
- .configure(&block) ⇒ Object
Instance Method Summary collapse
Methods included from Authorizable
#authorize!, #build_permissions, #effective_permissions
Methods included from Representer
#default_url_options, #handle_definition?, included, #link_path_for, #partial?, #render_hash, #represent!, representers, #resource_class, #to_resource
Instance Attribute Details
#endpoint ⇒ Object
Returns the value of attribute endpoint.
31 32 33 |
# File 'lib/garage/meta/remote_service.rb', line 31 def endpoint @endpoint end |
#name ⇒ Object
Returns the value of attribute name.
31 32 33 |
# File 'lib/garage/meta/remote_service.rb', line 31 def name @name end |
#namespace ⇒ Object
Returns the value of attribute namespace.
31 32 33 |
# File 'lib/garage/meta/remote_service.rb', line 31 def namespace @namespace end |
Class Method Details
.all ⇒ Object
14 15 16 |
# File 'lib/garage/meta/remote_service.rb', line 14 def all configuration.services end |
.build_permissions(perms, other, target) ⇒ Object
18 19 20 |
# File 'lib/garage/meta/remote_service.rb', line 18 def (perms, other, target) perms.permits! :read end |
.configuration ⇒ Object
10 11 12 |
# File 'lib/garage/meta/remote_service.rb', line 10 def configuration @config or raise "Garage::Meta::RemoteService.configure must be called in initializer" end |
Instance Method Details
#alternate_endpoints ⇒ Object
33 34 35 |
# File 'lib/garage/meta/remote_service.rb', line 33 def alternate_endpoints @alternate_endpoints ||= {} end |