Module: ActionService::Container::InstanceMethods
- Defined in:
- lib/action_service/container.rb
Instance Method Summary collapse
Instance Method Details
#service_object(service_name) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/action_service/container.rb', line 48 def service_object(service_name) info = self.class.services[service_name.to_sym] unless info raise(ContainerError, "no such service '#{service_name}'") end service = info[:block] service ? instance_eval(&service) : info[:object] end |