Class: GoogleApi::Shorten::Insert

Inherits:
Url
  • Object
show all
Defined in:
lib/google_api/shorten/url/insert.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Url

#_session

Constructor Details

#initialize(long_url) ⇒ Insert

Returns a new instance of Insert.



8
9
10
11
12
# File 'lib/google_api/shorten/url/insert.rb', line 8

def initialize(long_url)
  @long_url = long_url

  @short_url = _session.check_session ? get : 
end

Instance Attribute Details

#long_urlObject (readonly)

Returns the value of attribute long_url.



5
6
7
# File 'lib/google_api/shorten/url/insert.rb', line 5

def long_url
  @long_url
end

#short_urlObject (readonly)

Returns the value of attribute short_url.



6
7
8
# File 'lib/google_api/shorten/url/insert.rb', line 6

def short_url
  @short_url
end

Instance Method Details

#details(projection = 'FULL') ⇒ Object



14
15
16
# File 'lib/google_api/shorten/url/insert.rb', line 14

def details(projection = 'FULL')
  Shorten.get(@short_url, projection)
end