Module: SynchronizedModel
- Defined in:
- lib/synchronized_model.rb,
lib/synchronized_model/message.rb,
lib/synchronized_model/publish.rb,
lib/synchronized_model/railtie.rb,
lib/synchronized_model/support.rb,
lib/synchronized_model/version.rb,
lib/synchronized_model/model_message.rb,
lib/synchronized_model/publish_mixin.rb,
lib/synchronized_model/message_receive.rb
Defined Under Namespace
Modules: PublishMixin, Support Classes: Message, MessageReceive, ModelMessage, Publish, Railtie
Constant Summary collapse
- VERSION =
'0.3.2'
Class Attribute Summary collapse
-
.logger ⇒ Object
Returns the value of attribute logger.
-
.publish_handler ⇒ Object
Returns the value of attribute publish_handler.
-
.receive_resource_classes ⇒ Object
Returns the value of attribute receive_resource_classes.
Class Method Summary collapse
-
.configure {|_self| ... } ⇒ Object
“‘ruby SynchronizedModel.configure do |config| config.logger = Logger.new(STDOUT) config.publish_handler = proc do |message| Circuitry.publish(“wm-otto-models”, message) end config.receive_resource_classes = { ’item’: Item, ‘location’: Location } end “‘.
Class Attribute Details
.logger ⇒ Object
Returns the value of attribute logger.
15 16 17 |
# File 'lib/synchronized_model.rb', line 15 def logger @logger end |
.publish_handler ⇒ Object
Returns the value of attribute publish_handler.
15 16 17 |
# File 'lib/synchronized_model.rb', line 15 def publish_handler @publish_handler end |
.receive_resource_classes ⇒ Object
Returns the value of attribute receive_resource_classes.
15 16 17 |
# File 'lib/synchronized_model.rb', line 15 def receive_resource_classes @receive_resource_classes end |
Class Method Details
.configure {|_self| ... } ⇒ Object
“‘ruby SynchronizedModel.configure do |config|
config.logger = Logger.new(STDOUT)
config.publish_handler = proc do ||
Circuitry.publish("wm-otto-models", )
end
config.receive_resource_classes =
{
'item': Item,
'location': Location
}
end “‘
29 30 31 32 |
# File 'lib/synchronized_model.rb', line 29 def configure yield self true end |