Class: Hyperloop::InstanceBroadcastRegulation

Inherits:
Regulation
  • Object
show all
Defined in:
lib/hyper-operation/transport/policy.rb

Instance Attribute Summary

Attributes inherited from Regulation

#klass

Class Method Summary collapse

Methods inherited from Regulation

add_regulation, allowed_opts, #auto_connect_disabled?, #initialize, #opts, #regulate_for, #regulations, regulations, wrap_policy

Constructor Details

This class inherits a constructor from Hyperloop::Regulation

Class Method Details

.broadcast(instance, policy) ⇒ Object


342
343
344
345
346
347
348
349
# File 'lib/hyper-operation/transport/policy.rb', line 342

def self.broadcast(instance, policy)
  regulations[instance].regulations.each do |regulation|
    instance.instance_exec wrap_policy(policy, regulation), &regulation
  end
  if policy.has_unassigned_sets?
    raise "#{instance.class.name} instance broadcast policy not sent to any channel"
  end
end