Class: Chemicalml::Model::Metadata
- Defined in:
- lib/chemicalml/model/metadata.rb
Overview
A single metadata key/value pair.
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#convention ⇒ Object
Returns the value of attribute convention.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(name:, content:, id: nil, convention: nil, title: nil) ⇒ Metadata
constructor
A new instance of Metadata.
- #value_attributes ⇒ Object
Methods inherited from Node
#==, #accept, #children, #hash, short_name
Constructor Details
#initialize(name:, content:, id: nil, convention: nil, title: nil) ⇒ Metadata
Returns a new instance of Metadata.
9 10 11 12 13 14 15 |
# File 'lib/chemicalml/model/metadata.rb', line 9 def initialize(name:, content:, id: nil, convention: nil, title: nil) @name = name @content = content @id = id @convention = convention @title = title end |
Instance Attribute Details
#content ⇒ Object
Returns the value of attribute content.
7 8 9 |
# File 'lib/chemicalml/model/metadata.rb', line 7 def content @content end |
#convention ⇒ Object
Returns the value of attribute convention.
7 8 9 |
# File 'lib/chemicalml/model/metadata.rb', line 7 def convention @convention end |
#id ⇒ Object
Returns the value of attribute id.
7 8 9 |
# File 'lib/chemicalml/model/metadata.rb', line 7 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'lib/chemicalml/model/metadata.rb', line 7 def name @name end |
#title ⇒ Object
Returns the value of attribute title.
7 8 9 |
# File 'lib/chemicalml/model/metadata.rb', line 7 def title @title end |
Instance Method Details
#value_attributes ⇒ Object
17 18 19 20 |
# File 'lib/chemicalml/model/metadata.rb', line 17 def value_attributes { name: name, content: content, id: id, convention: convention, title: title } end |