Class: Rchive

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url) ⇒ Rchive

Returns a new instance of Rchive.



10
11
12
13
14
15
# File 'lib/rchive.rb', line 10

def initialize( url )
  base_url = URI.parse( url )
  @base_url = base_url.scheme + '://' + base_url.host
  @url = url 
  @doc = doc
end

Instance Attribute Details

#csssObject

Returns the value of attribute csss.



8
9
10
# File 'lib/rchive.rb', line 8

def csss
  @csss
end

#docObject

Returns the value of attribute doc.



8
9
10
# File 'lib/rchive.rb', line 8

def doc
  @doc
end

#imagesObject

Returns the value of attribute images.



8
9
10
# File 'lib/rchive.rb', line 8

def images
  @images
end

#urlObject

Returns the value of attribute url.



8
9
10
# File 'lib/rchive.rb', line 8

def url
  @url
end

Instance Method Details

#saveObject



53
54
55
56
57
# File 'lib/rchive.rb', line 53

def save
    self.csss
    self.images
  File.open( 'tmp.html' , 'w') { |f| f.write(@doc.to_html) }
end