Class: BadPigeon::URLEntity
- Inherits:
-
Object
- Object
- BadPigeon::URLEntity
- 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
- #expanded_url ⇒ Object
-
#initialize(json) ⇒ URLEntity
constructor
A new instance of URLEntity.
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_url ⇒ Object
14 15 16 |
# File 'lib/bad_pigeon/models/url_entity.rb', line 14 def Addressable::URI.parse(@json['expanded_url']) end |