Class: ProcessEngine::Parser::Extension::Property
- Inherits:
-
Object
- Object
- ProcessEngine::Parser::Extension::Property
- Defined in:
- app/models/process_engine/parser/extension/property.rb
Instance Attribute Summary collapse
-
#element ⇒ Object
readonly
Returns the value of attribute element.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(element) ⇒ Property
constructor
A new instance of Property.
- #to_h ⇒ Object
Constructor Details
#initialize(element) ⇒ Property
Returns a new instance of Property.
4 5 6 7 8 |
# File 'app/models/process_engine/parser/extension/property.rb', line 4 def initialize(element) @element = element @name = element["name"] @value = element["value"] end |
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
2 3 4 |
# File 'app/models/process_engine/parser/extension/property.rb', line 2 def element @element end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'app/models/process_engine/parser/extension/property.rb', line 2 def name @name end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
2 3 4 |
# File 'app/models/process_engine/parser/extension/property.rb', line 2 def value @value end |
Class Method Details
.factory(extension_element) ⇒ Object
17 18 19 |
# File 'app/models/process_engine/parser/extension/property.rb', line 17 def self.factory(extension_element) extension_element.xpath("camunda:properties//camunda:property").map { |el| new(el) } end |
Instance Method Details
#to_h ⇒ Object
10 11 12 13 14 15 |
# File 'app/models/process_engine/parser/extension/property.rb', line 10 def to_h { name: name, value: value } end |