Module: Miteru::Concerns::UrlTruncatable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/miteru/concerns/url_truncatable.rb
Instance Method Summary collapse
Instance Method Details
#decoded_url ⇒ Object
8 9 10 |
# File 'lib/miteru/concerns/url_truncatable.rb', line 8 def decoded_url @decoded_url ||= URI.decode_www_form_component(url) end |
#defanged_truncated_url ⇒ Object
19 20 21 |
# File 'lib/miteru/concerns/url_truncatable.rb', line 19 def defanged_truncated_url @defanged_truncated_url ||= truncated_url.to_s.gsub(".", "[.]") end |
#truncated_url ⇒ String
15 16 17 |
# File 'lib/miteru/concerns/url_truncatable.rb', line 15 def truncated_url @truncated_url ||= decoded_url.truncate(64) end |