summaryrefslogtreecommitdiff
path: root/lib/rdoc/rd/inline.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2025-01-15 11:52:40 +0900
committerHiroshi SHIBATA <[email protected]>2025-01-15 16:52:56 +0900
commit86d871d29cda15810d9d60dc1b94a07e9530e0cb (patch)
treeae0fd977690197a4c82eed861527c109caade4f1 /lib/rdoc/rd/inline.rb
parente0be1b902549f80fcdc95e801d4d533b0fdec43b (diff)
Migrate rdoc as bundled gems
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12577
Diffstat (limited to 'lib/rdoc/rd/inline.rb')
-rw-r--r--lib/rdoc/rd/inline.rb71
1 files changed, 0 insertions, 71 deletions
diff --git a/lib/rdoc/rd/inline.rb b/lib/rdoc/rd/inline.rb
deleted file mode 100644
index 77d88b2860..0000000000
--- a/lib/rdoc/rd/inline.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-# frozen_string_literal: true
-##
-# Inline keeps track of markup and labels to create proper links.
-
-class RDoc::RD::Inline
-
- ##
- # The text of the reference
-
- attr_reader :reference
-
- ##
- # The markup of this reference in RDoc format
-
- attr_reader :rdoc
-
- ##
- # Creates a new Inline for +rdoc+ and +reference+.
- #
- # +rdoc+ may be another Inline or a String. If +reference+ is not given it
- # will use the text from +rdoc+.
-
- def self.new rdoc, reference = rdoc
- if self === rdoc and reference.equal? rdoc then
- rdoc
- else
- super
- end
- end
-
- ##
- # Initializes the Inline with +rdoc+ and +inline+
-
- def initialize rdoc, reference # :not-new:
- @reference = reference.equal?(rdoc) ? reference.dup : reference
-
- # unpack
- @reference = @reference.reference if self.class === @reference
- @rdoc = rdoc
- end
-
- def == other # :nodoc:
- self.class === other and
- @reference == other.reference and @rdoc == other.rdoc
- end
-
- ##
- # Appends +more+ to this inline. +more+ may be a String or another Inline.
-
- def append more
- case more
- when String then
- @reference += more
- @rdoc += more
- when RDoc::RD::Inline then
- @reference += more.reference
- @rdoc += more.rdoc
- else
- raise "unknown thingy #{more}"
- end
-
- self
- end
-
- def inspect # :nodoc:
- "(inline: #{self})"
- end
-
- alias to_s rdoc # :nodoc:
-
-end