class Regextest::Front::Anchor::Anchor
Attributes
length[R]
offset[R]
Public Class Methods
new(type, val)
click to toggle source
Constructor
# File lib/regextest/front/anchor.rb, line 16 def initialize(type, val) TstLog("Anchor: value:#{val}") @type = type @value = val[0] || "" @offset = val[1] || -1 @length = val[2] || 0 end
Public Instance Methods
json()
click to toggle source
transform to json format
# File lib/regextest/front/anchor.rb, line 32 def json @@id += 1 "{" + "\"type\": \"#{@type}\", \"id\": \"A#{@@id}\", \"value\": \"#{@value}\", " + "\"offset\": #{@offset}, \"length\": #{@length}" + "}" end
set_options(options)
click to toggle source
set options
# File lib/regextest/front/anchor.rb, line 27 def set_options(options) TstLog("Anchor set_options: #{options[:reg_options].inspect}"); end