Class: Spider
- Inherits:
-
Object
- Object
- Spider
- Defined in:
- lib/contentar/spider.rb
Instance Attribute Summary collapse
-
#base_path ⇒ Object
readonly
Returns the value of attribute base_path.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#ignored_links ⇒ Object
readonly
Returns the value of attribute ignored_links.
Instance Method Summary collapse
- #get_data ⇒ Object
-
#initialize(base_path) ⇒ Spider
constructor
A new instance of Spider.
Constructor Details
#initialize(base_path) ⇒ Spider
Returns a new instance of Spider.
3 4 5 6 7 |
# File 'lib/contentar/spider.rb', line 3 def initialize(base_path) @base_path = base_path @ignored_links = [/.js/, /.css/] @data = [] end |
Instance Attribute Details
#base_path ⇒ Object (readonly)
Returns the value of attribute base_path.
2 3 4 |
# File 'lib/contentar/spider.rb', line 2 def base_path @base_path end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
2 3 4 |
# File 'lib/contentar/spider.rb', line 2 def data @data end |
#ignored_links ⇒ Object (readonly)
Returns the value of attribute ignored_links.
2 3 4 |
# File 'lib/contentar/spider.rb', line 2 def ignored_links @ignored_links end |
Instance Method Details
#get_data ⇒ Object
9 10 11 12 |
# File 'lib/contentar/spider.rb', line 9 def get_data get_site_data data end |