Class: Shale::Mapping::Descriptor::Xml Private
- Inherits:
-
Shale::Mapping::Dict
- Object
- Shale::Mapping::DictBase
- Shale::Mapping::Dict
- Shale::Mapping::Descriptor::Xml
- Defined in:
- lib/shale/mapping/descriptor/xml.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Class representing XML attribute mapping
Instance Attribute Summary collapse
-
#cdata ⇒ true, false
readonly
private
Return cdata.
-
#namespace ⇒ String
readonly
private
Return namespace.
Attributes inherited from Shale::Mapping::DictBase
Instance Method Summary collapse
-
#initialize(name:, attribute:, receiver:, methods:, group:, namespace:, cdata:, render_nil:) ⇒ Xml
constructor
private
Initialize instance.
-
#namespaced_name ⇒ String
private
Return name with XML namespace.
-
#prefixed_name ⇒ String
private
Return name with XML prefix.
Methods inherited from Shale::Mapping::Dict
Methods inherited from Shale::Mapping::DictBase
#finalize!, #finalized?, #initialize_dup, #map, #properties
Constructor Details
#initialize(name:, attribute:, receiver:, methods:, group:, namespace:, cdata:, render_nil:) ⇒ Xml
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize instance
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/shale/mapping/descriptor/xml.rb', line 38 def initialize( name:, attribute:, receiver:, methods:, group:, namespace:, cdata:, render_nil: ) super( name: name, attribute: attribute, receiver: receiver, methods: methods, group: group, render_nil: render_nil ) @namespace = namespace @cdata = cdata end |
Instance Attribute Details
#cdata ⇒ true, false (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return cdata
24 25 26 |
# File 'lib/shale/mapping/descriptor/xml.rb', line 24 def cdata @cdata end |
#namespace ⇒ String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return namespace
17 18 19 |
# File 'lib/shale/mapping/descriptor/xml.rb', line 17 def namespace @namespace end |
Instance Method Details
#namespaced_name ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return name with XML namespace
75 76 77 |
# File 'lib/shale/mapping/descriptor/xml.rb', line 75 def namespaced_name [namespace.name, name].compact.join(':') end |
#prefixed_name ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return name with XML prefix
66 67 68 |
# File 'lib/shale/mapping/descriptor/xml.rb', line 66 def prefixed_name [namespace.prefix, name].compact.join(':') end |