Class: ServiceProvider::Provider::Automatic
- Inherits:
-
Object
- Object
- ServiceProvider::Provider::Automatic
- Defined in:
- lib/service_provider/provider/automatic.rb
Defined Under Namespace
Classes: Services
Class Method Summary collapse
Class Method Details
.add_service(requested_service_name, service_class) ⇒ Object
4 5 6 7 |
# File 'lib/service_provider/provider/automatic.rb', line 4 def self.add_service(requested_service_name, service_class) service_name = requested_service_name ? requested_service_name.to_sym : underscore_string(service_class.name).to_sym Services.instance.put service_name, service_class end |
.get_service(service_name) ⇒ Object
9 10 11 |
# File 'lib/service_provider/provider/automatic.rb', line 9 def self.get_service(service_name) Services.instance.get service_name end |