-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #652 from aycabta/rename-special-with-regexp-handling
Rename the name "special" with "regexp handling"
- Loading branch information
Showing
22 changed files
with
235 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# frozen_string_literal: true | ||
## | ||
# Hold details of a regexp handling sequence | ||
|
||
class RDoc::Markup::RegexpHandling | ||
|
||
## | ||
# Regexp handling type | ||
|
||
attr_reader :type | ||
|
||
## | ||
# Regexp handling text | ||
|
||
attr_accessor :text | ||
|
||
## | ||
# Creates a new regexp handling sequence of +type+ with +text+ | ||
|
||
def initialize(type, text) | ||
@type, @text = type, text | ||
end | ||
|
||
## | ||
# Regexp handlings are equal when the have the same text and type | ||
|
||
def ==(o) | ||
self.text == o.text && self.type == o.type | ||
end | ||
|
||
def inspect # :nodoc: | ||
"#<RDoc::Markup::RegexpHandling:0x%x @type=%p, @text=%p>" % [ | ||
object_id, @type, text.dump] | ||
end | ||
|
||
def to_s # :nodoc: | ||
"RegexpHandling: type=#{type} text=#{text.dump}" | ||
end | ||
|
||
end | ||
|
Oops, something went wrong.