Module: Juknife::Scraping::DSL
Overview
A DSL for definition scraping items on the web page.
Defined Under Namespace
Classes: Item, Items, Scope
Instance Method Summary
collapse
Instance Method Details
#children ⇒ Object
27
28
29
|
# File 'lib/juknife/scraping/dsl.rb', line 27
def children
@children ||= []
end
|
#item(name, *args, &block) ⇒ Object
15
16
17
|
# File 'lib/juknife/scraping/dsl.rb', line 15
def item(name, *args, &block)
children << Item.new(name, *args, &block)
end
|
#items(name, *args, &block) ⇒ Object
19
20
21
|
# File 'lib/juknife/scraping/dsl.rb', line 19
def items(name, *args, &block)
children << Items.new(name, *args, &block)
end
|
#scope(name, *args, &block) ⇒ Object
23
24
25
|
# File 'lib/juknife/scraping/dsl.rb', line 23
def scope(name, *args, &block)
children << Scope.new(name, *args, &block)
end
|