Class: RexleCSS

Inherits:
Object
  • Object
show all
Defined in:
lib/rexle-css.rb

Overview

file: rexle-css.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_xpathObject (readonly)

Returns the value of attribute to_xpath.



7
8
9
# File 'lib/rexle-css.rb', line 7

def to_xpath
  @to_xpath
end