Class: Fleakr::Support::UrlExpander

Inherits:
Object
  • Object
show all
Defined in:
lib/fleakr/support/url_expander.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_url) ⇒ UrlExpander

Returns a new instance of UrlExpander.



10
11
12
# File 'lib/fleakr/support/url_expander.rb', line 10

def initialize(source_url)
  @source_url = source_url
end

Class Method Details

.expand(url) ⇒ Object



6
7
8
# File 'lib/fleakr/support/url_expander.rb', line 6

def self.expand(url)
  new(url).expanded_path
end

Instance Method Details

#expanded_pathObject



18
19
20
# File 'lib/fleakr/support/url_expander.rb', line 18

def expanded_path
  response_headers['location']
end

#path_to_expandObject



14
15
16
# File 'lib/fleakr/support/url_expander.rb', line 14

def path_to_expand
  "/photo.gne?short=#{short_photo_id}"
end