Class: Hecks::Bluebook::Policy
- Inherits:
-
Object
- Object
- Hecks::Bluebook::Policy
- Includes:
- Behaviour::Policy, IR
- Defined in:
- lib/hecks/bluebook/policy.rb
Instance Attribute Summary collapse
-
#aggregate ⇒ Object
AGGREGATE, DECLARED AND DELIBERATELY OFF THE WIRE the wire format is a pinned contract, and it does not carry where a policy was written before the builder hoisted it.
-
#for_each ⇒ Object
readonly
Returns the value of attribute for_each.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#on_event ⇒ Object
readonly
Returns the value of attribute on_event.
-
#target_domain ⇒ Object
readonly
Returns the value of attribute target_domain.
-
#trigger_command ⇒ Object
readonly
Returns the value of attribute trigger_command.
-
#where ⇒ Object
readonly
Returns the value of attribute where.
-
#with_spec ⇒ Object
readonly
Returns the value of attribute with_spec.
Instance Method Summary collapse
-
#initialize(name:, on_event: nil, trigger_command: nil, target_domain: nil, where: nil, for_each: nil, with_spec: [], aggregate: nil) ⇒ Policy
constructor
A new instance of Policy.
Methods included from Behaviour::Policy
#event_name, #event_qualifier, #fans_out?, #for_each_route, #guarded?, #hecks_name
Methods included from IR
Constructor Details
#initialize(name:, on_event: nil, trigger_command: nil, target_domain: nil, where: nil, for_each: nil, with_spec: [], aggregate: nil) ⇒ Policy
Returns a new instance of Policy.
29 30 31 32 33 34 35 36 37 38 |
# File 'lib/hecks/bluebook/policy.rb', line 29 def initialize(name:, on_event: nil, trigger_command: nil, target_domain: nil, where: nil, for_each: nil, with_spec: [], aggregate: nil) @name = name.to_s @on_event = on_event @trigger_command = trigger_command @target_domain = target_domain @where = where @for_each = for_each @with_spec = with_spec @aggregate = aggregate&.to_s end |
Instance Attribute Details
#aggregate ⇒ Object
AGGREGATE, DECLARED AND DELIBERATELY OFF THE WIRE the wire format is a pinned contract, and it does not carry where a policy was written before the builder hoisted it
27 28 29 |
# File 'lib/hecks/bluebook/policy.rb', line 27 def aggregate @aggregate end |
#for_each ⇒ Object (readonly)
Returns the value of attribute for_each.
22 23 24 |
# File 'lib/hecks/bluebook/policy.rb', line 22 def for_each @for_each end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
22 23 24 |
# File 'lib/hecks/bluebook/policy.rb', line 22 def name @name end |
#on_event ⇒ Object (readonly)
Returns the value of attribute on_event.
22 23 24 |
# File 'lib/hecks/bluebook/policy.rb', line 22 def on_event @on_event end |
#target_domain ⇒ Object (readonly)
Returns the value of attribute target_domain.
22 23 24 |
# File 'lib/hecks/bluebook/policy.rb', line 22 def target_domain @target_domain end |
#trigger_command ⇒ Object (readonly)
Returns the value of attribute trigger_command.
22 23 24 |
# File 'lib/hecks/bluebook/policy.rb', line 22 def trigger_command @trigger_command end |
#where ⇒ Object (readonly)
Returns the value of attribute where.
22 23 24 |
# File 'lib/hecks/bluebook/policy.rb', line 22 def where @where end |
#with_spec ⇒ Object (readonly)
Returns the value of attribute with_spec.
22 23 24 |
# File 'lib/hecks/bluebook/policy.rb', line 22 def with_spec @with_spec end |