summaryrefslogtreecommitdiff
path: root/new/lib/crys/processors/rss_processor.rb
blob: bce48ad65f28fe7da2ee2a7ac5e33e10fa1c82ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require_relative "common_functions"
require_relative "common_parts"

module Crys
  class RssProcessor
    def initialize(file_path:, image_dir:)
      @file_path = file_path
      rss_file = File.read(file_path)
      instance_eval(rss_file)
      @assets = []
    end

    def parsed_content
      rss.content
    end

    def filename
      rss.filename
    end

    attr_reader :assets, :file_path

    private

    attr_reader :rss

  end
end