Class: Twitter::Status

Inherits:
Object
  • Object
show all
Defined in:
lib/murmuring_spider/status.rb

Instance Method Summary collapse

Instance Method Details

#url_expanded_textObject



5
6
7
8
9
10
11
12
13
# File 'lib/murmuring_spider/status.rb', line 5

def url_expanded_text
  if @attrs['entities'].nil?
    text
  else
    @url_expanded_text ||= Array(@attrs['entities']['urls']).reduce(text) do |t, url|
      t.gsub(url['url'], url['expanded_url'])
    end
  end
end