Class: RexleCSS
- Inherits:
-
Object
- Object
- RexleCSS
- Defined in:
- lib/rexle-css.rb
Overview
file: rexle-css.rb
Instance Attribute Summary collapse
-
#to_xpath ⇒ Object
readonly
Returns the value of attribute to_xpath.
Instance Method Summary collapse
-
#initialize(selector) ⇒ RexleCSS
constructor
A new instance of RexleCSS.
Constructor Details
#initialize(selector) ⇒ RexleCSS
Returns a new instance of RexleCSS.
9 10 11 12 13 |
# File 'lib/rexle-css.rb', line 9 def initialize(selector) @to_xpath = selector.prepend('//')\ .gsub(/#(\w+)/,'div[@id="\1"]')\ .gsub(/ /,'//') end |
Instance Attribute Details
#to_xpath ⇒ Object (readonly)
Returns the value of attribute to_xpath.
7 8 9 |
# File 'lib/rexle-css.rb', line 7 def to_xpath @to_xpath end |