Class: BadPigeon::URLEntity

Inherits:
Object
  • Object
show all
Defined in:
lib/bad_pigeon/models/url_entity.rb

Overview

A model that represents a “URL entity” of a tweet (a shortened link with info about the shortened and original URL).

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ URLEntity



10
11
12
# File 'lib/bad_pigeon/models/url_entity.rb', line 10

def initialize(json)
  @json = json
end

Instance Method Details

#expanded_urlObject



14
15
16
# File 'lib/bad_pigeon/models/url_entity.rb', line 14

def expanded_url
  Addressable::URI.parse(@json['expanded_url'])
end