Class: BPMN::Element

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Element

Returns a new instance of Element.



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

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.



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

def extension_elements
  @extension_elements
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#inspectObject



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

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