Skip to content

Commit

Permalink
[ruby/rdoc] [DOC] nodoc for probably internal methods
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Dec 15, 2023
1 parent e15d690 commit 20f4f00
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/rdoc/generator/pot.rb
Expand Up @@ -81,6 +81,7 @@ def generate
end
end

# :nodoc:
def class_dir
nil
end
Expand Down
3 changes: 3 additions & 0 deletions lib/rdoc/markup/attribute_manager.rb
Expand Up @@ -138,6 +138,7 @@ def copy_string(start_pos, end_pos)
res
end

# :nodoc:
def exclusive?(attr)
(attr & @exclusive_bitmap) != 0
end
Expand All @@ -155,6 +156,7 @@ def convert_attrs(str, attrs, exclusive = false)
convert_attrs_word_pair_map(str, attrs, exclusive)
end

# :nodoc:
def convert_attrs_matching_word_pairs(str, attrs, exclusive)
# first do matching ones
tags = @matching_word_pairs.select { |start, bitmap|
Expand All @@ -179,6 +181,7 @@ def convert_attrs_matching_word_pairs(str, attrs, exclusive)
str.delete!(NON_PRINTING_START + NON_PRINTING_END)
end

# :nodoc:
def convert_attrs_word_pair_map(str, attrs, exclusive)
# then non-matching
unless @word_pair_map.empty? then
Expand Down
4 changes: 4 additions & 0 deletions lib/rdoc/markup/parser.rb
Expand Up @@ -420,6 +420,8 @@ def peek_token
# A simple wrapper of StringScanner that is aware of the current column and lineno

class MyStringScanner
# :stopdoc:

def initialize(input)
@line = @column = 0
@s = StringScanner.new input
Expand Down Expand Up @@ -456,6 +458,8 @@ def matched
def [](i)
@s[i]
end

#:startdoc:
end

##
Expand Down
3 changes: 2 additions & 1 deletion lib/rdoc/markup/table.rb
Expand Up @@ -17,6 +17,7 @@ def initialize header, align, body
@header, @align, @body = header, align, body
end

# :stopdoc:
def == other
self.class == other.class and
@header == other.header and
Expand All @@ -28,7 +29,7 @@ def accept visitor
visitor.accept_table @header, @body, @align
end

def pretty_print q # :nodoc:
def pretty_print q
q.group 2, '[Table: ', ']' do
q.group 2, '[Head: ', ']' do
q.seplist @header.zip(@align) do |text, align|
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/markup/to_html.rb
Expand Up @@ -61,6 +61,7 @@ def initialize options, markup = nil
#
# These methods are used by regexp handling markup added by RDoc::Markup#add_regexp_handling.

# :nodoc:
URL_CHARACTERS_REGEXP_STR = /[A-Za-z0-9\-._~:\/\?#\[\]@!$&'\(\)*+,;%=]/.source

##
Expand Down
1 change: 1 addition & 0 deletions lib/rdoc/markup/to_html_crossref.rb
Expand Up @@ -42,6 +42,7 @@ def initialize(options, from_path, context, markup = nil)
@cross_reference = RDoc::CrossReference.new @context
end

# :nodoc:
def init_link_notation_regexp_handlings
add_regexp_handling_RDOCLINK

Expand Down
4 changes: 4 additions & 0 deletions lib/rdoc/parser/ripper_state_lex.rb
Expand Up @@ -5,6 +5,8 @@
# Wrapper for Ripper lex states

class RDoc::Parser::RipperStateLex
# :stopdoc:

# TODO: Remove this constants after Ruby 2.4 EOL
RIPPER_HAS_LEX_STATE = Ripper::Filter.method_defined?(:state)

Expand Down Expand Up @@ -568,6 +570,8 @@ def get_squashed_tk
tk
end

# :startdoc:

# New lexer for +code+.
def initialize(code)
@buf = []
Expand Down

0 comments on commit 20f4f00

Please sign in to comment.