Class: RailsSpider::Work
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- RailsSpider::Work
- Defined in:
- app/models/rails_spider/work.rb
Instance Method Summary collapse
Instance Method Details
#parse ⇒ Object
17 18 19 20 21 |
# File 'app/models/rails_spider/work.rb', line 17 def parse locals.each do |local| local.run end end |
#parser ⇒ Object
13 14 15 |
# File 'app/models/rails_spider/work.rb', line 13 def parser @parser ||= self.parser_name.to_s.safe_constantize end |
#resource ⇒ Object
5 6 7 |
# File 'app/models/rails_spider/work.rb', line 5 def resource @resource ||= Resource.new(self) end |
#run ⇒ Object
9 10 11 |
# File 'app/models/rails_spider/work.rb', line 9 def run @resource.run end |