Class: Card::Content::Chunk::EmailUri
- Defined in:
- lib/card/content/chunk/uri.rb
Overview
FIXME: DRY, merge these two into one class
Constant Summary collapse
- PREPEND_STR =
"mailto:".freeze
- EMAIL =
'[a-zA-Z\\d](?:[-a-zA-Z\\d.]*[a-zA-Z\\d])?\\@'.freeze
Constants inherited from Uri
Uri::REJECTED_PREFIX_RE, Uri::SCHEMES
Instance Attribute Summary
Attributes inherited from Uri
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
Instance Method Details
#process_text ⇒ Object
removes the prepended string from the unchanged match text
105 106 107 |
# File 'lib/card/content/chunk/uri.rb', line 105 def process_text @text = @text.sub(/^mailto:/, "") end |