Sha256: 7251d921feb3b85346e6581c91f7d54b360c5037714d7ae8d03a71a1ced00aa7

Contents?: true

Size: 688 Bytes

Versions: 4

Compression:

Stored size: 688 Bytes

Contents

module Remi
  # An extractor is an object meant to extract data from some external system.
  # This is a parent class meant to be inherited by child classes that
  # define specific ways to extract data.
  class Extractor

    def initialize(*args, logger: Remi::Settings.logger, **kargs, &block)
      @logger = logger
    end

    # @return [Object] The logger object used by the extractor
    attr_accessor :logger

    # Any child classes need to define an extract method that returns data
    # in a format that an appropriate parser can use to convert into a dataframe
    def extract
      raise NoMethodError, "#{__method__} not defined for #{self.class.name}"
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
remi-0.3.3 lib/remi/extractor.rb
remi-0.3.2 lib/remi/extractor.rb
remi-0.3.1 lib/remi/extractor.rb
remi-0.3.0 lib/remi/extractor.rb