Class: Stylesheet::Document
- Inherits:
-
Object
- Object
- Stylesheet::Document
- Defined in:
- lib/stylesheet/document.rb
Instance Method Summary collapse
-
#initialize(url = nil) ⇒ Document
constructor
A new instance of Document.
- #location ⇒ Object
- #location=(location) ⇒ Object
- #style_sheets ⇒ Object
- #text ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(url = nil) ⇒ Document
Returns a new instance of Document.
4 5 6 |
# File 'lib/stylesheet/document.rb', line 4 def initialize(url=nil) @url = url end |
Instance Method Details
#location ⇒ Object
8 9 10 |
# File 'lib/stylesheet/document.rb', line 8 def location @location ||= Location.new(@url) end |
#location=(location) ⇒ Object
12 13 14 |
# File 'lib/stylesheet/document.rb', line 12 def location=(location) @location = location end |
#style_sheets ⇒ Object
20 21 22 |
# File 'lib/stylesheet/document.rb', line 20 def style_sheets @style_sheets ||= StyleSheetList.new(styles) end |
#text ⇒ Object
16 17 18 |
# File 'lib/stylesheet/document.rb', line 16 def text @text ||= request_content end |
#to_s ⇒ Object
24 25 26 |
# File 'lib/stylesheet/document.rb', line 24 def to_s "#<Document location:#{location.href}>" end |