Class: SpotFlow::Bpmn::Flow

Inherits:
Element
  • Object
show all
Defined in:
lib/spot_flow/bpmn/flow.rb

Direct Known Subclasses

Association, SequenceFlow, TextAnnotation

Instance Attribute Summary collapse

Attributes inherited from Element

#extension_elements, #id, #name

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Flow

Returns a new instance of Flow.



9
10
11
12
13
14
15
16
# File 'lib/spot_flow/bpmn/flow.rb', line 9

def initialize(attributes = {})
  super(attributes.except(:source_ref, :target_ref))

  @source_ref = attributes[:source_ref]
  @target_ref = attributes[:target_ref]
  @source = nil
  @target = nil
end

Instance Attribute Details

#sourceObject

Returns the value of attribute source.



7
8
9
# File 'lib/spot_flow/bpmn/flow.rb', line 7

def source
  @source
end

#source_refObject

Returns the value of attribute source_ref.



6
7
8
# File 'lib/spot_flow/bpmn/flow.rb', line 6

def source_ref
  @source_ref
end

#targetObject

Returns the value of attribute target.



7
8
9
# File 'lib/spot_flow/bpmn/flow.rb', line 7

def target
  @target
end

#target_refObject

Returns the value of attribute target_ref.



6
7
8
# File 'lib/spot_flow/bpmn/flow.rb', line 6

def target_ref
  @target_ref
end

Instance Method Details

#inspectObject



18
19
20
21
22
23
# File 'lib/spot_flow/bpmn/flow.rb', line 18

def inspect
  parts = ["#<#{self.class.name.gsub(/SpotFlow::/, "")} @id=#{id.inspect}"]
  parts << "@source_ref=#{source_ref.inspect}" if source_ref
  parts << "@target_ref=#{target_ref.inspect}" if target_ref
  parts.join(" ") + ">"
end