Sha256: 8a3426865570cd47e53329675c162ad35d3995e9cc0bb420da2bd8d3e0d7c327

Contents?: true

Size: 529 Bytes

Versions: 4

Compression:

Stored size: 529 Bytes

Contents

require File.expand_path('../formatted_url/url_source_resolver', __FILE__)

# FormattedURL provides an easy way
# to catch URL in differents formats
# Working with Youtube URLs, you can get the
# short, embed and default format
module FormattedURL
  # Format url acording to it's source
  #
  ## Examples:
  #
  #   FormattedURL.url("http://www.youtube.com/watch?v=RchTlF4aKGs", :embed)
  #   => "http://youtube.com/embed/RchTlF4aKGs"
  def self.url(path, format = :default)
    URLSourceResolver.new(path, format).url
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
formatted_url-0.0.6 lib/formatted_url.rb
formatted_url-0.0.5 lib/formatted_url.rb
formatted_url-0.0.4 lib/formatted_url.rb
formatted_url-0.0.3 lib/formatted_url.rb