Sha256: b93aca33ae47b5d17d5a2e2aa925f8bcdfa8aa9eb2f9ce5e646292b5afba4221
Contents?: true
Size: 647 Bytes
Versions: 4
Compression:
Stored size: 647 Bytes
Contents
require File.expand_path('../strategies/default_url_strategy', __FILE__) require File.expand_path('../strategies/youtube_url_strategy', __FILE__) module FormattedURL # Setting the strategies # TODO: Configurable strategies STRATEGIES = { :youtube => Strategies::YoutubeURLStrategy, :default => Strategies::DefaultURLStrategy } # Returns strategy based on source # which is a Symbol # # Example: # # FormattedURL.strategy(:youtube) # => Strategies::YoutubeURLStrategy def self.strategy(source) STRATEGIES[source] end # Namespace for URL Strategies module Strategies end end
Version data entries
4 entries across 4 versions & 1 rubygems