Class: Archimate::Export::PropertiesHash

Inherits:
Object
  • Object
show all
Defined in:
lib/archimate/export/jsonl.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(properties) ⇒ PropertiesHash

Returns a new instance of PropertiesHash.



54
55
56
# File 'lib/archimate/export/jsonl.rb', line 54

def initialize(properties)
  @properties = properties
end

Instance Attribute Details

#propertiesObject (readonly)

Returns the value of attribute properties.



52
53
54
# File 'lib/archimate/export/jsonl.rb', line 52

def properties
  @properties
end

Instance Method Details

#to_hObject



58
59
60
61
62
# File 'lib/archimate/export/jsonl.rb', line 58

def to_h
  properties.each_with_object({}) do |property, hash|
    hash[property.key.to_s] = property.value.to_s
  end
end