Module: XMLable::Mixins::ValueStorage
- Defined in:
- lib/xmlable/mixins/value_storage.rb
Overview
ValueStorage modules contains the logic to manage XML attributes values
Instance Method Summary collapse
-
#__empty? ⇒ Boolean
private
Is this element empty?.
-
#__object ⇒ Object
private
Get unwraped attribute object’s value.
-
#__overwrite_value(val) ⇒ Object
private
Overwrite XML attribute’s value.
-
#__set_value(node) ⇒ Object
private
Set XML attribute value.
-
#__value ⇒ Object
private
Get attribute value.
-
#__value=(val) ⇒ Object
private
Set value.
- #to_s ⇒ String
Instance Method Details
#__empty? ⇒ Boolean
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.
Is this element empty?
71 72 73 74 |
# File 'lib/xmlable/mixins/value_storage.rb', line 71 def __empty? return false unless super __empty(__value) end |
#__object ⇒ Object
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.
Get unwraped attribute object’s value
48 49 50 |
# File 'lib/xmlable/mixins/value_storage.rb', line 48 def __object __value end |
#__overwrite_value(val) ⇒ Object
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.
Overwrite XML attribute’s value
36 37 38 39 |
# File 'lib/xmlable/mixins/value_storage.rb', line 36 def __overwrite_value(val) @__node.content = __export_to_xml(val) self.__value = val end |
#__set_value(node) ⇒ Object
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.
Set XML attribute value
14 15 16 |
# File 'lib/xmlable/mixins/value_storage.rb', line 14 def __set_value(node) self.__value = __cast(node.content) end |
#__value ⇒ Object
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.
Get attribute value
60 61 62 |
# File 'lib/xmlable/mixins/value_storage.rb', line 60 def __value @__value end |
#__value=(val) ⇒ Object
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.
Set value
25 26 27 |
# File 'lib/xmlable/mixins/value_storage.rb', line 25 def __value=(val) @__value = val end |
#to_s ⇒ String
79 80 81 |
# File 'lib/xmlable/mixins/value_storage.rb', line 79 def to_s __value.to_s end |