Class: MyState

Inherits:
Object show all
Defined in:
lib/vendor/json_pure/tools/fuzz.rb

Constant Summary collapse

WS =
" \r\t\n"

Instance Method Summary collapse

Constructor Details

#initializeMyState

Returns a new instance of MyState.



88
89
90
91
92
93
94
95
96
97
# File 'lib/vendor/json_pure/tools/fuzz.rb', line 88

def initialize
  super(
        :indent       => make_spaces,
        :space        => make_spaces,
        :space_before => make_spaces,
        :object_nl    => make_spaces,
        :array_nl     => make_spaces,
        :max_nesting  => false
       )
end

Instance Method Details

#make_spacesObject



99
100
101
102
103
# File 'lib/vendor/json_pure/tools/fuzz.rb', line 99

def make_spaces
  s = ''
  rand(1).times { s << WS[rand(WS.size)] }
  s
end