rb/lib/twitter-text/extractor.rb
# Extracts all usernames, lists, hashtags and URLs  in the Tweet <tt>text</tt>
# along with the indices for where the entity ocurred
# If the <tt>text</tt> is <tt>nil</tt> or contains no entity an empty array
# will be returned.
#
# If a block is given then it will be called for each entity.
Extracts all usernames, lists, hashtags and URLs  in the Tweet text
along with the indices for where the entity ocurred
If the text is nil or contains no entity an empty array
will be returned.

If a block is given then it will be called for each entity.
Extracts all usernames lists hashtags and URLs in the Tweet text along with the indices for where the entity ocurred If the text is nil or contains no entity an empty array will be returned . If a block is given then it will be called for each entity .
def extract_entities_with_indices(text, options = {}, &block)
        config = options[:config] || Twitter::TwitterText::Configuration.default_configuration
        entities = extract_urls_with_indices(text, options) +
                   extract_hashtags_with_indices(text, :check_url_overlap => false) +
                   extract_mentions_or_lists_with_indices(text) +
                   extract_cashtags_with_indices(text)
        entities += extract_emoji_with_indices(text) if config.emoji_parsing_enabled
        return [] if entities.empty?
        entities = remove_overlapping_entities(entities)
        entities.each(&block) if block_given?
        entities
      end
def extract_entities_with_indices ( text , options = { } , & block ) config = options [ :config ] || Twitter :: TwitterText :: Configuration . default_configuration entities = extract_urls_with_indices ( text , options ) + extract_hashtags_with_indices ( text , :check_url_overlap => false ) + extract_mentions_or_lists_with_indices ( text ) + extract_cashtags_with_indices ( text ) entities += extract_emoji_with_indices ( text ) if config . emoji_parsing_enabled return [ ] if entities . empty? entities = remove_overlapping_entities ( entities ) entities . each ( & block ) if block_given? entities end
Extracts all usernames, lists, hashtags and URLs  in the Tweet <tt>text</tt>
along with the indices for where the entity ocurred
If the <tt>text</tt> is <tt>nil</tt> or contains no entity an empty array
will be returned.
Extracts all usernames lists hashtags and URLs in the Tweet <tt > text< / tt > along with the indices for where the entity ocurred If the <tt > text< / tt > is <tt > nil< / tt > or contains no entity an empty array will be returned .
# extract all entities
text
<not_specific>
options
<not_specific>
block
<not_specific>