@@ -7,14 +7,14 @@ class JSONWriter < Writer
7
7
8
8
def write
9
9
File . open ( docs_dir . join ( "index.json" ) , "w+" ) do |f |
10
- f . write Formatter . to_json ( JsonIndex . new ( index , configuration ) )
10
+ f . write Formatter . to_json ( JSONIndex . new ( index , configuration ) )
11
11
end
12
12
write_examples
13
13
end
14
14
15
15
def write_examples
16
16
index . examples . each do |example |
17
- json_example = JsonExample . new ( example , configuration )
17
+ json_example = JSONExample . new ( example , configuration )
18
18
FileUtils . mkdir_p ( docs_dir . join ( json_example . dirname ) )
19
19
File . open ( docs_dir . join ( json_example . dirname , json_example . filename ) , "w+" ) do |f |
20
20
f . write Formatter . to_json ( json_example )
@@ -23,7 +23,7 @@ def write_examples
23
23
end
24
24
end
25
25
26
- class JsonIndex
26
+ class JSONIndex
27
27
def initialize ( index , configuration )
28
28
@index = index
29
29
@configuration = configuration
@@ -34,7 +34,7 @@ def sections
34
34
end
35
35
36
36
def examples
37
- @index . examples . map { |example | JsonExample . new ( example , @configuration ) }
37
+ @index . examples . map { |example | JSONExample . new ( example , @configuration ) }
38
38
end
39
39
40
40
def as_json ( opts = nil )
@@ -61,7 +61,7 @@ def section_hash(section)
61
61
end
62
62
end
63
63
64
- class JsonExample
64
+ class JSONExample
65
65
def initialize ( example , configuration )
66
66
@example = example
67
67
@host = configuration . curl_host
0 commit comments