Class: FakeHtmlParser
- Inherits:
-
Object
- Object
- FakeHtmlParser
- Defined in:
- lib/nibbler.rb
Instance Method Summary collapse
- #at(selector) ⇒ Object
-
#initialize(name) ⇒ FakeHtmlParser
constructor
A new instance of FakeHtmlParser.
- #search(selector) ⇒ Object
Constructor Details
#initialize(name) ⇒ FakeHtmlParser
Returns a new instance of FakeHtmlParser.
181 182 183 |
# File 'lib/nibbler.rb', line 181 def initialize(name) @name = name end |
Instance Method Details
#at(selector) ⇒ Object
185 186 187 |
# File 'lib/nibbler.rb', line 185 def at(selector) "fake #{@name}" end |
#search(selector) ⇒ Object
189 190 191 |
# File 'lib/nibbler.rb', line 189 def search(selector) (1..3).map { |n| self.class.new(@name + n.to_s) } end |