Class: Desuraify::Company
- Inherits:
-
Base
- Object
- Base
- Desuraify::Company
show all
- Defined in:
- lib/desuraify/company.rb
Constant Summary
collapse
- ATTRIBUTES =
[
:address, :company, :engines_count, :games_count, :html, :images, :images_count,
:members, :members_count, :news_count, :office, :official_page, :phone, :rank,
:videos, :videos_count, :visits, :watchers
]
Instance Attribute Summary
Attributes inherited from Base
#callback, #error, #hydra, #id
Instance Method Summary
collapse
Methods inherited from Base
#enqueue_update, #parse_headers, #parse_similar, #rss_update, #to_s, #update
Constructor Details
#initialize(id, options = {}) ⇒ Company
Returns a new instance of Company.
12
13
14
|
# File 'lib/desuraify/company.rb', line 12
def initialize(id, options={})
super(id, options)
end
|
Instance Method Details
#attributes ⇒ Object
39
40
41
|
# File 'lib/desuraify/company.rb', line 39
def attributes
ATTRIBUTES
end
|
31
32
33
|
# File 'lib/desuraify/company.rb', line 31
def
"http://rss.desura.com/company/#{@id}/images/feed/rss.xml"
end
|
#parse(html) ⇒ Object
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/desuraify/company.rb', line 16
def parse(html)
doc = Nokogiri::HTML(html)
result = (doc.css('h5'))
result.merge!(parse_similar(doc))
result[:html] = html
result
end
|
#url ⇒ Object
27
28
29
|
# File 'lib/desuraify/company.rb', line 27
def url
"http://www.desura.com/company/#{@id}"
end
|
35
36
37
|
# File 'lib/desuraify/company.rb', line 35
def
"http://rss.desura.com/company/#{@id}/videos/feed/rss.xml"
end
|