rb/lib/twitter-text/extractor.rb
# Extracts a list of all URLs included in the Tweet <tt>text</tt>. If the
# <tt>text</tt> is <tt>nil</tt> or contains no URLs an empty array
# will be returned.
#
# If a block is given then it will be called for each URL.
Extracts a list of all URLs included in the Tweet text. If the
text is nil or contains no URLs an empty array
will be returned.

If a block is given then it will be called for each URL.
Extracts a list of all URLs included in the Tweet text . If the text is nil or contains no URLs an empty array will be returned . If a block is given then it will be called for each URL .
def extract_urls(text, &block) 
        urls = extract_urls_with_indices(text).map{|u| u[:url]}
        urls.each(&block) if block_given?
        urls
      end
def extract_urls ( text , & block ) urls = extract_urls_with_indices ( text ) . map { | u | u [ :url ] } urls . each ( & block ) if block_given? urls end
Extracts a list of all URLs included in the Tweet <tt>text</tt>.
Extracts a list of all URLs included in the Tweet <tt > text< / tt > .
# :yields: url
text
<not_specific>
block
<not_specific>