class REX12::Element
Attributes
position[R]
@return [Integer] zero based location of this element in its parent segment
value[R]
@return [String] base text value of the element (does not break up sub elements)
Public Class Methods
new(value, position)
click to toggle source
@param value [String] base text value of the element @param sub_element_separator [String] character that should be used to split sub elements @param position [Integer] zero based position of this element in its parent segment
# File lib/rex12/element.rb, line 12 def initialize value, position @value = value.freeze @position = position.freeze end
Public Instance Methods
sub_elements?()
click to toggle source
@return [true, false] does the element have sub elements
# File lib/rex12/element.rb, line 18 def sub_elements? false end
to_s()
click to toggle source
# File lib/rex12/element.rb, line 22 def to_s value end
Protected Instance Methods
position=(pos)
click to toggle source
# File lib/rex12/element.rb, line 31 def position= pos @position = pos end
value=(v)
click to toggle source
# File lib/rex12/element.rb, line 27 def value= v @value = v end