Class: RGovData::RegistryStrategy
- Inherits:
-
Object
- Object
- RGovData::RegistryStrategy
- Defined in:
- lib/rgovdata/catalog/registry_strategy/registry_strategy.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#realm ⇒ Object
Returns the value of attribute realm.
Class Method Summary collapse
-
.instance_for_realm(realm) ⇒ Object
Returns the appropriate RegistryStrategy for the given realm
realm
is the required realm.
Instance Method Summary collapse
-
#initialize(default_realm = nil) ⇒ RegistryStrategy
constructor
new
accepts realm parameter. -
#load_services ⇒ Object
Returns the list of services for the realm.
Constructor Details
#initialize(default_realm = nil) ⇒ RegistryStrategy
new
accepts realm parameter
17 18 19 |
# File 'lib/rgovdata/catalog/registry_strategy/registry_strategy.rb', line 17 def initialize(default_realm=nil) @realm = default_realm end |
Instance Attribute Details
#realm ⇒ Object
Returns the value of attribute realm.
2 3 4 |
# File 'lib/rgovdata/catalog/registry_strategy/registry_strategy.rb', line 2 def realm @realm end |
Class Method Details
.instance_for_realm(realm) ⇒ Object
Returns the appropriate RegistryStrategy for the given realm realm
is the required realm
7 8 9 10 11 12 13 |
# File 'lib/rgovdata/catalog/registry_strategy/registry_strategy.rb', line 7 def instance_for_realm(realm) # TODO: this is where we can abstract different registry schemes # e.g by default we will look for a class called Rgovdata::<realm>Registry (Rgovdata::ZhRegistry) # else we take the default strategy # Currently this just defaults to internal registry: RGovData::InternalRegistry.new(realm) end |
Instance Method Details
#load_services ⇒ Object
Returns the list of services for the realm
22 23 24 |
# File 'lib/rgovdata/catalog/registry_strategy/registry_strategy.rb', line 22 def load_services [] end |