Class: MyState

Inherits:
Object show all
Defined in:
lib/gems/json_pure-1.1.3/tools/fuzz.rb

Constant Summary collapse

WS =
" \r\t\n"

Instance Method Summary collapse

Constructor Details

#initializeMyState

Returns a new instance of MyState.



89
90
91
92
93
94
95
96
97
98
# File 'lib/gems/json_pure-1.1.3/tools/fuzz.rb', line 89

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



100
101
102
103
104
# File 'lib/gems/json_pure-1.1.3/tools/fuzz.rb', line 100

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