7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/mml/base/content/cn.rb', line 7
def self.included(klass)
klass.class_eval do
attribute :type, :string
attribute :definition_url, :string
attribute :enc, :string
attribute :base, :string
attribute :value, :string
attribute :sep_value, :sep, collection: true
xml do
namespace Mml::Namespace
element "cn"
mixed_content
map_content to: :value
map_element "sep", to: :sep_value
map_attribute "type", to: :type
map_attribute "definitionURL", to: :definition_url
map_attribute "encoding", to: :enc
map_attribute "base", to: :base
end
end
end
|