Method: WAB::Data#set
- Defined in:
- lib/wab/data.rb
#set(_path, _value) ⇒ Object
Sets the node value identified by the path where the path elements are separated by the ‘.’ character. The path can also be a array of path node identifiers. For example, child.grandchild is the same as [‘child’, ‘grandchild’]. The value must be one of the allowed data values described in the initialize method.
For arrays, the behavior is similar to an Array#[] with the exception of a negative index less than the negative length in which case the value is prepended (Array#unshift).
- path
-
path to location to be set
- value
-
value to set
- repair
-
flag indicating invalid value should be repaired if possible
41 42 43 |
# File 'lib/wab/data.rb', line 41 def set(_path, _value) raise NotImplementedError.new end |