Module: HashtagUrl
- Defined in:
- lib/hashtag_url.rb,
lib/hashtag_url/version.rb
Constant Summary collapse
- SUPPORTED_NETWORKS =
[ 'vk', 'vkontakte', 'twitter', 'instagram', 'facebook', 'fb' ]
- VERSION =
"1.0.2"
Instance Method Summary collapse
Instance Method Details
#hashtag_url(hashtag, social_network) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/hashtag_url.rb', line 5 def hashtag_url(hashtag, ) if SUPPORTED_NETWORKS.include? .to_s.underscore send , hashtag.to_s.gsub('#', '') else raise "Gem HashtagUrl doesn't support #{} hashtag links. You can update gem on http://github.com/kalashnikovisme/hashtag_url It's easy!" end end |