Class: Rchive
- Inherits:
-
Object
- Object
- Rchive
- Defined in:
- lib/rchive.rb
Instance Attribute Summary collapse
-
#csss ⇒ Object
Returns the value of attribute csss.
-
#doc ⇒ Object
Returns the value of attribute doc.
-
#images ⇒ Object
Returns the value of attribute images.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url) ⇒ Rchive
constructor
A new instance of Rchive.
- #save ⇒ Object
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
#csss ⇒ Object
Returns the value of attribute csss.
8 9 10 |
# File 'lib/rchive.rb', line 8 def csss @csss end |
#doc ⇒ Object
Returns the value of attribute doc.
8 9 10 |
# File 'lib/rchive.rb', line 8 def doc @doc end |
#images ⇒ Object
Returns the value of attribute images.
8 9 10 |
# File 'lib/rchive.rb', line 8 def images @images end |
#url ⇒ Object
Returns the value of attribute url.
8 9 10 |
# File 'lib/rchive.rb', line 8 def url @url end |
Instance Method Details
#save ⇒ Object
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 |