Module: Lich::Util::TextStripper::Mode
- Defined in:
- documented/util/textstripper.rb
Constant Summary collapse
- HTML =
Strip HTML tags Constant representing the HTML stripping mode
:html- XML =
Strip XML tags Constant representing the XML stripping mode
:xml- MARKUP =
Strip Markdown/markup formatting Constant representing the MARKUP stripping mode
:markup- MARKDOWN =
Alias for MARKUP (both :markup and :markdown are accepted) Alias for MARKUP, representing the MARKDOWN stripping mode
:markdown- ALL =
Array of all available stripping modes
[HTML, XML, MARKUP, MARKDOWN].freeze
Class Method Summary collapse
-
.list ⇒ String
Returns a comma-separated list of all valid modes.
-
.valid?(mode) ⇒ Boolean
Checks if the given mode is valid.
Class Method Details
.list ⇒ String
Returns a comma-separated list of all valid modes
63 64 65 |
# File 'documented/util/textstripper.rb', line 63 def self.list ALL.join(', ') end |
.valid?(mode) ⇒ Boolean
Checks if the given mode is valid
55 56 57 |
# File 'documented/util/textstripper.rb', line 55 def self.valid?(mode) ALL.include?(mode.to_sym) end |