Class: Regextest::Front::Empty::TEmpty
- Inherits:
-
Object
- Object
- Regextest::Front::Empty::TEmpty
- Includes:
- Common
- Defined in:
- lib/regextest/front/empty.rb
Constant Summary collapse
- @@id =
a class variable for generating unique name of element
0
Constants included from Common
Common::TstConstDebug, Common::TstConstRecursionMax, Common::TstConstRepeatMax, Common::TstConstRetryMax, Common::TstConstRetryMaxSecond, Common::TstConstTimeout, Common::TstConstUnicodeCharSet, Common::TstFixnumMax
Instance Attribute Summary collapse
-
#length ⇒ Object
readonly
Returns the value of attribute length.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
Instance Method Summary collapse
-
#initialize ⇒ TEmpty
constructor
Constructor.
-
#json ⇒ Object
generate json format.
-
#set_options(options) ⇒ Object
set options.
Methods included from Common
#TstLog, #TstMdPrint, #TstRand, #TstShuffle, #is_random?, #reset_random_called
Constructor Details
Instance Attribute Details
#length ⇒ Object (readonly)
Returns the value of attribute length.
20 21 22 |
# File 'lib/regextest/front/empty.rb', line 20 def length @length end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
20 21 22 |
# File 'lib/regextest/front/empty.rb', line 20 def offset @offset end |
Instance Method Details
#json ⇒ Object
generate json format
30 31 32 33 34 35 36 |
# File 'lib/regextest/front/empty.rb', line 30 def json @@id += 1 "{" + "\"type\": \"LEX_EMPTY\", \"id\": \"E#{@@id}\", \"value\": \"\", " + "\"offset\": #{@offset}, \"length\": #{@length}" + "}" end |
#set_options(options) ⇒ Object
set options
23 24 25 26 27 |
# File 'lib/regextest/front/empty.rb', line 23 def () TstLog("Empty set_options: #{[:reg_options].inspect}"); # do nothing self end |