Class: Rigor::FlowContribution::Element
- Inherits:
-
Data
- Object
- Data
- Rigor::FlowContribution::Element
- Defined in:
- lib/rigor/flow_contribution/element.rb
Instance Attribute Summary collapse
-
#edge ⇒ Object
readonly
Returns the value of attribute edge.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#provenance ⇒ Object
readonly
Returns the value of attribute provenance.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(target:, edge:, kind:, payload:, provenance:) ⇒ Element
constructor
A new instance of Element.
- #merge_key ⇒ Object
Constructor Details
#initialize(target:, edge:, kind:, payload:, provenance:) ⇒ Element
Returns a new instance of Element.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/rigor/flow_contribution/element.rb', line 32 def initialize(target:, edge:, kind:, payload:, provenance:) unless ELEMENT_VALID_EDGES.include?(edge) raise ArgumentError, "FlowContribution::Element edge must be one of " \ "#{ELEMENT_VALID_EDGES.inspect}, got #{edge.inspect}" end unless ELEMENT_VALID_KINDS.include?(kind) raise ArgumentError, "FlowContribution::Element kind must be one of " \ "#{ELEMENT_VALID_KINDS.inspect}, got #{kind.inspect}" end super end |
Instance Attribute Details
#edge ⇒ Object (readonly)
Returns the value of attribute edge
31 32 33 |
# File 'lib/rigor/flow_contribution/element.rb', line 31 def edge @edge end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind
31 32 33 |
# File 'lib/rigor/flow_contribution/element.rb', line 31 def kind @kind end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload
31 32 33 |
# File 'lib/rigor/flow_contribution/element.rb', line 31 def payload @payload end |
#provenance ⇒ Object (readonly)
Returns the value of attribute provenance
31 32 33 |
# File 'lib/rigor/flow_contribution/element.rb', line 31 def provenance @provenance end |
#target ⇒ Object (readonly)
Returns the value of attribute target
31 32 33 |
# File 'lib/rigor/flow_contribution/element.rb', line 31 def target @target end |
Instance Method Details
#merge_key ⇒ Object
48 49 50 |
# File 'lib/rigor/flow_contribution/element.rb', line 48 def merge_key [target, edge, kind] end |