Class: SpotFlow::Bpmn::Element
- Inherits:
-
Object
- Object
- SpotFlow::Bpmn::Element
- Includes:
- ActiveModel::Model
- Defined in:
- lib/spot_flow/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.
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_elements ⇒ Object
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 |
#id ⇒ Object
Returns the value of attribute id.
8 9 10 |
# File 'lib/spot_flow/bpmn/element.rb', line 8 def id @id end |
#name ⇒ Object
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
#inspect ⇒ Object
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 |