Class: Copland::ServiceModel::PrototypeServiceModel

Inherits:
AbstractServiceModel show all
Defined in:
lib/copland/models/prototype.rb

Overview

This is the most trivial of all service models. It simply calls the ServicePoint#instantiate method of the service point it protects. In this way, the service point becomes a prototype (or template) for instantiation.

Instance Attribute Summary

Attributes inherited from AbstractServiceModel

#service_point

Instance Method Summary collapse

Methods inherited from AbstractServiceModel

#initialize, register_as

Constructor Details

This class inherits a constructor from Copland::ServiceModel::AbstractServiceModel

Instance Method Details

#instance(&block) ⇒ Object

Invokes ServicePoint#instantiate on the model’s protected service point.



48
49
50
# File 'lib/copland/models/prototype.rb', line 48

def instance( &block )
  @service_point.instantiate( &block )
end