Class: WordpRSS::Url

Inherits:
Object
  • Object
show all
Defined in:
lib/wordprss/url.rb

Class Method Summary collapse

Class Method Details

.parse(url) ⇒ String

Parses given URL to get the version with the /feed

Returns:

  • (String)


8
9
10
11
12
# File 'lib/wordprss/url.rb', line 8

def self.parse(url)
  return url if url.nil? || url.match(/\/feed$/)

  "#{url}/feed"
end