Class: Remi::Extractor::SubJob

Inherits:
Remi::Extractor show all
Defined in:
lib/remi/data_subjects/sub_job.rb

Instance Attribute Summary collapse

Attributes inherited from Remi::Extractor

#logger

Instance Method Summary collapse

Constructor Details

#initialize(*args, **kargs, &block) ⇒ SubJob

Returns a new instance of SubJob.

Parameters:

  • sub_job (Object)

    The name (relative to parent job) of the subjob to use

  • data_subject (Symbol)

    The name (relatvie to the sub job) of the sub job's data frame



6
7
8
9
# File 'lib/remi/data_subjects/sub_job.rb', line 6

def initialize(*args, **kargs, &block)
  super
  init_sub_job_extractor(*args, **kargs, &block)
end

Instance Attribute Details

#data_subjectObject

Returns the value of attribute data_subject.



11
12
13
# File 'lib/remi/data_subjects/sub_job.rb', line 11

def data_subject
  @data_subject
end

#sub_jobObject

Returns the value of attribute sub_job.



11
12
13
# File 'lib/remi/data_subjects/sub_job.rb', line 11

def sub_job
  @sub_job
end

Instance Method Details

#extractObject



13
14
15
16
# File 'lib/remi/data_subjects/sub_job.rb', line 13

def extract
  sub_job.execute unless sub_job.sub_job.send(data_subject).is_a? Remi::DataSource
  sub_job.sub_job.send(data_subject).df
end