Class: Lutaml::Model::KeyValueDocument
- Inherits:
-
Object
- Object
- Lutaml::Model::KeyValueDocument
show all
- Defined in:
- lib/lutaml/model/key_value_document.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of KeyValueDocument.
6
7
8
|
# File 'lib/lutaml/model/key_value_document.rb', line 6
def initialize(attributes = {})
@attributes = attributes
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4
5
6
|
# File 'lib/lutaml/model/key_value_document.rb', line 4
def attributes
@attributes
end
|
Instance Method Details
#[](key) ⇒ Object
10
11
12
|
# File 'lib/lutaml/model/key_value_document.rb', line 10
def [](key)
@attributes[key]
end
|
#[]=(key, value) ⇒ Object
14
15
16
|
# File 'lib/lutaml/model/key_value_document.rb', line 14
def []=(key, value)
@attributes[key] = value
end
|
#key?(key) ⇒ Boolean
18
19
20
|
# File 'lib/lutaml/model/key_value_document.rb', line 18
def key?(key)
@attributes.key?(key)
end
|
#to_h ⇒ Object
22
23
24
|
# File 'lib/lutaml/model/key_value_document.rb', line 22
def to_h
@attributes
end
|