Module: Dcc::Base::StringWithLang
- Included in:
- V2::StringWithLang, V3::StringWithLang
- Defined in:
- lib/dcc/base/string_with_lang.rb
Overview
dcc:stringWithLangType — single localized string with an optional
xml:lang attribute. Used inside dcc:textType and many other types.
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/dcc/base/string_with_lang.rb', line 8 def self.included(klass) klass.class_eval do attribute :value, :string, collection: true attribute :lang, :string xml do namespace ::Dcc::Namespace::Dcc element "content" mixed_content map_content to: :value map_attribute "lang", to: :lang end end end |