Class: Webpipe::Link
- Inherits:
-
Struct
- Object
- Struct
- Webpipe::Link
- Defined in:
- lib/webpipe/types.rb
Overview
A link extracted from a page.
Instance Attribute Summary collapse
-
#href ⇒ Object
Returns the value of attribute href.
-
#text ⇒ Object
Returns the value of attribute text.
Class Method Summary collapse
Instance Attribute Details
#href ⇒ Object
Returns the value of attribute href
5 6 7 |
# File 'lib/webpipe/types.rb', line 5 def href @href end |
#text ⇒ Object
Returns the value of attribute text
5 6 7 |
# File 'lib/webpipe/types.rb', line 5 def text @text end |
Class Method Details
.from_hash(hash) ⇒ Object
6 7 8 |
# File 'lib/webpipe/types.rb', line 6 def self.from_hash(hash) new(hash["text"], hash["href"]) end |