Skip to content

Commit cca6ecc

Browse files
znzclaude
andcommitted
Remove unused constants, instance variables, and methods
- INDENT_CODE_OFFSET, DIRECTIVE_ELSE_RE, CONTINUATION_DIRECTIVE_RE - @class_name in both converters - convert_entry_signature in MarkdownToRRD Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent b583669 commit cca6ecc

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

lib/bitclust/markdown_to_rrd.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ def convert
1616
@lines = @src.lines
1717
@out = []
1818
@index = 0
19-
@class_name = nil
2019
@front_matter = {}
2120

2221
parse_front_matter
@@ -302,11 +301,6 @@ def convert_h4_heading(line)
302301
convert_heading_with_anchor(line, '====')
303302
end
304303

305-
def convert_entry_signature(line)
306-
@out << line.sub(/\A### /, '--- ')
307-
advance
308-
end
309-
310304
def strip_code_span(text)
311305
text.sub(/\A`(.+)`\z/, '\\1')
312306
end
@@ -425,9 +419,6 @@ def convert_h2(line)
425419
end
426420

427421
def convert_h1(line)
428-
if line =~ /\A# (?:class|module|object|reopen|redefine)\s+(\S+)/
429-
@class_name = $1
430-
end
431422
@out << line.sub(/\A# /, '= ')
432423
advance
433424
end

lib/bitclust/rrd_to_markdown.rb

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
module BitClust
44
class RRDToMarkdown
5-
INDENT_CODE_OFFSET = 3
6-
75
def self.convert(rrd)
86
new(rrd).convert
97
end
@@ -16,7 +14,6 @@ def convert
1614
@lines = @src.lines
1715
@out = []
1816
@index = 0
19-
@class_name = nil
2017
@front_matter = {}
2118
@current_section = nil
2219

@@ -163,7 +160,6 @@ def convert_emlist(line)
163160
end
164161

165162
DIRECTIVE_NEST_RE = /\A\#@(?:since|until|if)\b/
166-
DIRECTIVE_ELSE_RE = /\A\#@else\s*$/
167163
DIRECTIVE_END_RE = /\A\#@end\s*$/
168164

169165
def convert_samplecode(line)
@@ -255,8 +251,6 @@ def convert_see(line)
255251
collect_continuation_lines
256252
end
257253

258-
CONTINUATION_DIRECTIVE_RE = /\A\#@(?:since|until|if|else|end)\b/
259-
260254
def collect_continuation_lines
261255
nest = 0
262256
while @index < @lines.length
@@ -407,9 +401,6 @@ def convert_indented_code(line)
407401
end
408402

409403
def convert_h1(line)
410-
if line =~ /\A= (?:class|module|object|reopen|redefine)\s+(\S+)/
411-
@class_name = $1
412-
end
413404
@out << line.sub(/\A= /, '# ')
414405
advance
415406
# include/extend/alias はパススルー(front matter にしない)

0 commit comments

Comments
 (0)