Class: Xing::Snapshot::SiteSnapshot
- Inherits:
-
Object
- Object
- Xing::Snapshot::SiteSnapshot
show all
- Defined in:
- lib/xing/snapshot/site_snapshot.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of SiteSnapshot.
12
13
14
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 12
def initialize(url)
@url = url
end
|
Instance Attribute Details
#url ⇒ Object
Returns the value of attribute url.
15
16
17
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 15
def url
@url
end
|
Class Method Details
.create!(url) ⇒ Object
7
8
9
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 7
def create!(url)
self.new(url).create!
end
|
Instance Method Details
#create! ⇒ Object
17
18
19
20
21
22
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 17
def create!
@sitemap_page_set = SitePageSet.new(url)
setup
generate_snapshot
teardown
end
|
#fetch(url, path) ⇒ Object
33
34
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 33
def fetch(url, path)
end
|
#generate_snapshot ⇒ Object
27
28
29
30
31
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 27
def generate_snapshot
@sitemap_page_set.visit_pages do |url, path, updated_at|
fetch(url, path)
end
end
|
#setup ⇒ Object
24
25
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 24
def setup
end
|
#teardown ⇒ Object
36
37
|
# File 'lib/xing/snapshot/site_snapshot.rb', line 36
def teardown
end
|