Skip to content

Commit 755d8d5

Browse files
authored
Hide internal classes from documentation (#348)
## Why? `REXML::FunctionsClass` (and the `REXML::Functions` singleton), `REXML::SourceFactory`, `REXML::Source`, `REXML::IOSource`, `REXML::Output` and `REXML::Parsers::XPathParser` are for internal use only, so mark them with `:nodoc:` to exclude them from the generated documentation. ### See - https://docs.ruby-lang.org/ja/latest/class/REXML=3a=3aFunctions.html - https://docs.ruby-lang.org/ja/latest/class/REXML=3a=3aSource.html - https://docs.ruby-lang.org/ja/latest/class/REXML=3a=3aIOSource.html - https://docs.ruby-lang.org/ja/latest/class/REXML=3a=3aSourceFactory.html - https://docs.ruby-lang.org/ja/latest/class/REXML=3a=3aOutput.html - https://docs.ruby-lang.org/ja/latest/class/REXML=3a=3aParsers=3a=3aXPathParser.html
1 parent 7166f74 commit 755d8d5

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

lib/rexml/functions.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module REXML
77
# (2) all method calls from XML will have "-" replaced with "_".
88
# Therefore, in XML, "local-name()" is identical (and actually becomes)
99
# "local_name()"
10-
class FunctionsClass
10+
class FunctionsClass # :nodoc:
1111
@@available_functions = {}
1212

1313
def initialize
@@ -434,5 +434,5 @@ def send(name, *args)
434434
# Using this singleton instance may cause thread-safety issues
435435
# especially when accessing variables, context and namespace_context.
436436
# Consider instantiating your own FunctionsClass object.
437-
Functions = FunctionsClass.new
437+
Functions = FunctionsClass.new # :nodoc:
438438
end

lib/rexml/output.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
require_relative 'encoding'
33

44
module REXML
5-
class Output
5+
class Output # :nodoc:
66
include Encoding
77

88
attr_reader :encoding

lib/rexml/parsers/xpathparser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module Parsers
99
# for this class. Believe me. You don't want to poke around in here.
1010
# There is strange, dark magic at work in this code. Beware. Go back! Go
1111
# back while you still can!
12-
class XPathParser
12+
class XPathParser # :nodoc:
1313
include XMLTokens
1414
LITERAL = /^'([^']*)'|^"([^"]*)"/u
1515

lib/rexml/source.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
module REXML
1010
if StringScanner::Version < "1.0.0"
11-
module StringScannerCheckScanString
11+
module StringScannerCheckScanString # :nodoc:
1212
refine StringScanner do
1313
def check(pattern)
1414
pattern = /#{Regexp.escape(pattern)}/ if pattern.is_a?(String)
@@ -35,7 +35,7 @@ def skip(pattern)
3535
end
3636

3737
# Generates Source-s. USE THIS CLASS.
38-
class SourceFactory
38+
class SourceFactory # :nodoc:
3939
# Generates a Source object
4040
# @param arg Either a String, or an IO
4141
# @return a Source, or nil if a bad argument was given
@@ -58,7 +58,7 @@ def SourceFactory::create_from(arg)
5858

5959
# A Source can be searched for patterns, and wraps buffers and other
6060
# objects and provides consumption of text
61-
class Source
61+
class Source # :nodoc: all
6262
include Encoding
6363
# The line number of the last consumed text
6464
attr_reader :line
@@ -217,7 +217,7 @@ def encoding_updated
217217

218218
# A Source that wraps an IO. See the Source class for method
219219
# documentation
220-
class IOSource < Source
220+
class IOSource < Source # :nodoc:
221221
#attr_reader :block_size
222222

223223
# block_size has been deprecated

0 commit comments

Comments
 (0)