Class: Chemicalml::Model::PropertyList

Inherits:
Node
  • Object
show all
Defined in:
lib/chemicalml/model/property_list.rb

Overview

Container for Property instances.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#==, #accept, #hash, short_name

Constructor Details

#initialize(properties: [], id: nil, title: nil, dict_ref: nil) ⇒ PropertyList

Returns a new instance of PropertyList.



9
10
11
12
13
14
# File 'lib/chemicalml/model/property_list.rb', line 9

def initialize(properties: [], id: nil, title: nil, dict_ref: nil)
  @properties = properties
  @id = id
  @title = title
  @dict_ref = dict_ref
end

Instance Attribute Details

#dict_refObject

Returns the value of attribute dict_ref.



7
8
9
# File 'lib/chemicalml/model/property_list.rb', line 7

def dict_ref
  @dict_ref
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/chemicalml/model/property_list.rb', line 7

def id
  @id
end

#propertiesObject

Returns the value of attribute properties.



7
8
9
# File 'lib/chemicalml/model/property_list.rb', line 7

def properties
  @properties
end

#titleObject

Returns the value of attribute title.



7
8
9
# File 'lib/chemicalml/model/property_list.rb', line 7

def title
  @title
end

Instance Method Details

#childrenObject



16
17
18
# File 'lib/chemicalml/model/property_list.rb', line 16

def children
  properties
end

#value_attributesObject



20
21
22
# File 'lib/chemicalml/model/property_list.rb', line 20

def value_attributes
  { properties: properties, id: id, title: title, dict_ref: dict_ref }
end