Class: BPMN::Element
- Inherits:
-
Object
- Object
- BPMN::Element
- Includes:
- ActiveModel::Model
- Defined in:
- lib/bpmn/element.rb
Direct Known Subclasses
Collaboration, Error, EventDefinition, Flow, LaneSet, Message, Participant, Signal, Step
Instance Attribute Summary collapse
-
#extension_elements ⇒ Object
Returns the value of attribute extension_elements.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Element
constructor
A new instance of Element.
- #inspect ⇒ Object
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_elements ⇒ Object
Returns the value of attribute extension_elements.
7 8 9 |
# File 'lib/bpmn/element.rb', line 7 def extension_elements @extension_elements end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/bpmn/element.rb', line 7 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/bpmn/element.rb', line 7 def name @name end |
Instance Method Details
#inspect ⇒ Object
15 16 17 |
# File 'lib/bpmn/element.rb', line 15 def inspect "#<#{self.class.name.gsub(/BPMN::/, "")} @id=#{id.inspect} @name=#{name.inspect}>" end |