Class: WebUnit::Link
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#onClick ⇒ Object
readonly
Returns the value of attribute onClick.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Attributes inherited from HtmlElem
#array, #attrs, #children, #data, #name, #tag
Instance Method Summary collapse
-
#initialize(ah) ⇒ Link
constructor
A new instance of Link.
-
#read ⇒ Object
— Link#read return a Response of getting of ‘@href’.
Methods inherited from HtmlElem
#append, #extract, #find, #has?, #inspect, #print, #readlink, #search
Constructor Details
#initialize(ah) ⇒ Link
Returns a new instance of Link.
15 16 17 18 19 20 |
# File 'lib/webunit/link.rb', line 15 def initialize( ah ) super( 'a', ah ) @href = ah["href"] @target = ah["target"] @onClick = ah["onclick"] end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
13 14 15 |
# File 'lib/webunit/link.rb', line 13 def href @href end |
#onClick ⇒ Object (readonly)
Returns the value of attribute onClick.
13 14 15 |
# File 'lib/webunit/link.rb', line 13 def onClick @onClick end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
13 14 15 |
# File 'lib/webunit/link.rb', line 13 def target @target end |