Class: WebInspector::Page
- Inherits:
-
Object
- Object
- WebInspector::Page
- Defined in:
- lib/web_inspector/page.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#links ⇒ Object
readonly
Returns the value of attribute links.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, options = {}) ⇒ Page
constructor
A new instance of Page.
- #to_hash ⇒ Object
Constructor Details
#initialize(url, options = {}) ⇒ Page
Returns a new instance of Page.
14 15 16 17 18 19 |
# File 'lib/web_inspector/page.rb', line 14 def initialize(url, = {}) @url = url = @uri = WebInspector::Uri.new(url) @inspector = WebInspector::Inspector.new(page) end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def description @description end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def host @host end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def images @images end |
#links ⇒ Object (readonly)
Returns the value of attribute links.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def links @links end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def port @port end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def response @response end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def scheme @scheme end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def size @size end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def title @title end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/web_inspector/page.rb', line 12 def url @url end |
Instance Method Details
#to_hash ⇒ Object
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/web_inspector/page.rb', line 57 def to_hash { 'url' => url, 'scheme' => scheme, 'host' => host, 'port' => port, 'title' => title, 'description' => description, 'meta' => , 'links' => links, 'images' => images, 'response' => { 'status' => response.status, 'headers' => response.headers } } end |