Class: ProcessEngine::Parser::Extension::Property

Inherits:
Object
  • Object
show all
Defined in:
app/models/process_engine/parser/extension/property.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

#elementObject (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

#nameObject (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

#valueObject (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_hObject



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