Class: Xxx::SzukajCipki

Inherits:
Object
  • Object
show all
Defined in:
lib/xxx/szukaj_cipki.rb

Constant Summary collapse

HOST =
"http://szukajcipki.pl"

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#docObject

Returns the value of attribute doc.



5
6
7
# File 'lib/xxx/szukaj_cipki.rb', line 5

def doc
  @doc
end

Returns the value of attribute link.



5
6
7
# File 'lib/xxx/szukaj_cipki.rb', line 5

def link
  @link
end

Instance Method Details

#agentObject



7
8
9
# File 'lib/xxx/szukaj_cipki.rb', line 7

def agent
  @doc = Nokogiri::HTML(open(HOST))
end

#latestObject



11
12
13
# File 'lib/xxx/szukaj_cipki.rb', line 11

def latest
  @link = HOST + agent.css("ul#movies a").first['href']
end