7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/chemicalml/cml/base/unit_type.rb', line 7
def self.included(klass)
klass.class_eval do
include Chemicalml::Cml::Role::UnitType
attribute :id, :string
attribute :name, :string
attribute :definition, :string
attribute :description, :string
xml do
namespace Chemicalml::Cml::Namespace
root "unitType"
map_attribute "id", to: :id
map_attribute "name", to: :name
map_element "definition", to: :definition
map_element "description", to: :description
end
end
end
|