Class: SpotFlow::Bpmn::Element

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
lib/spot_flow/bpmn/element.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Element

Returns a new instance of Element.



10
11
12
13
14
# File 'lib/spot_flow/bpmn/element.rb', line 10

def initialize(attributes = {})
  super(attributes.slice(:id, :name))

  @extension_elements = ExtensionElements.new(attributes[:extension_elements]) if attributes[:extension_elements].present?
end

Instance Attribute Details

#extension_elementsObject

Returns the value of attribute extension_elements.



8
9
10
# File 'lib/spot_flow/bpmn/element.rb', line 8

def extension_elements
  @extension_elements
end

#idObject

Returns the value of attribute id.



8
9
10
# File 'lib/spot_flow/bpmn/element.rb', line 8

def id
  @id
end

#nameObject

Returns the value of attribute name.



8
9
10
# File 'lib/spot_flow/bpmn/element.rb', line 8

def name
  @name
end

Instance Method Details

#inspectObject



16
17
18
# File 'lib/spot_flow/bpmn/element.rb', line 16

def inspect
  "#<#{self.class.name.gsub(/SpotFlow::/, "")} @id=#{id.inspect} @name=#{name.inspect}>"
end