Class: Card::Content::Chunk::EmailURI
- Defined in:
- mod/core/chunk/uri.rb
Overview
FIXME: DRY, merge these two into one class
Constant Summary collapse
- PREPEND_STR =
"mailto:".freeze
- EMAIL =
'[a-zA-Zd](?:[-a-zA-Zd]*[a-zA-Zd])?\\@'.freeze
Constants inherited from URI
URI::REJECTED_PREFIX_RE, URI::SCHEMES
Instance Attribute Summary
Attributes inherited from URI
Attributes inherited from Abstract
Instance Method Summary collapse
-
#process_text ⇒ Object
removes the prepended string from the unchanged match text.
Methods inherited from URI
context_ok?, full_match, #interpret
Methods inherited from Abstract
#as_json, #burn_after_reading, #burn_read, #card, context_ok?, #format, full_match, full_re, #initialize, #inspect, #interpret, #reference_code, #result, #to_s
Constructor Details
This class inherits a constructor from Card::Content::Chunk::Abstract
Instance Method Details
#process_text ⇒ Object
removes the prepended string from the unchanged match text
102 103 104 |
# File 'mod/core/chunk/uri.rb', line 102 def process_text @text = @text.sub(/^mailto:/, "") end |