Class: Rigor::FlowContribution::Element
- Inherits:
-
Object
- Object
- Rigor::FlowContribution::Element
- Defined in:
- lib/rigor/flow_contribution/element.rb
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 Method Details
#merge_key ⇒ Object
48 49 50 |
# File 'lib/rigor/flow_contribution/element.rb', line 48 def merge_key [target, edge, kind] end |