Class: OpenStack::Keystone::Public::Base
- Inherits:
-
Common
- Object
- ActiveResource::Base
- Base
- Common
- OpenStack::Keystone::Public::Base
- Defined in:
- lib/open_stack/keystone/public/base.rb
Direct Known Subclasses
Class Method Summary collapse
-
.site ⇒ Object
Get the Keystone endpoint assigned to OpenStack::Keystone::Public classes.
-
.site=(site) ⇒ Object
Set the Keystone endpoint assigned to OpenStack::Keystone::Public classes.
Methods inherited from Common
collection_path, custom_method_collection_url, element_path
Methods inherited from Base
Methods inherited from ActiveResource::Base
Class Method Details
.site ⇒ Object
Get the Keystone endpoint assigned to OpenStack::Keystone::Public classes
25 26 27 28 29 30 31 |
# File 'lib/open_stack/keystone/public/base.rb', line 25 def self.site if self == OpenStack::Keystone::Public::Base Thread.current[:open_stack_keystone_public_site] else super end end |
.site=(site) ⇒ Object
Set the Keystone endpoint assigned to OpenStack::Keystone::Public classes
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/open_stack/keystone/public/base.rb', line 34 def self.site=(site) super(site) Thread.current[:open_stack_keystone_public_site] = @site # Regenerate the prefix method default = @site.path default << '/' unless default[-1..-1] == '/' # generate the actual method based on the current site path self.prefix = default @site end |