Class: Remi::DataSubject
- Inherits:
-
Object
- Object
- Remi::DataSubject
- Defined in:
- lib/remi/data_subject.rb
Direct Known Subclasses
Remi::DataSource::CsvFile, Remi::DataSource::DataFrame, Remi::DataSource::Postgres, Remi::DataSource::Salesforce, Remi::DataTarget::CsvFile, Remi::DataTarget::DataFrame, Remi::DataTarget::Postgres, Remi::DataTarget::Salesforce, Remi::DataTarget::SftpFile
Defined Under Namespace
Modules: CsvFile, DataSource, DataTarget, Postgres, Salesforce
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
Instance Method Summary collapse
- #df ⇒ Object
- #df=(new_dataframe) ⇒ Object
- #field_symbolizer ⇒ Object
-
#initialize(*args, fields: Remi::Fields.new, remi_df_type: :daru, logger: Remi::Settings.logger, **kargs, &block) ⇒ DataSubject
constructor
A new instance of DataSubject.
Constructor Details
#initialize(*args, fields: Remi::Fields.new, remi_df_type: :daru, logger: Remi::Settings.logger, **kargs, &block) ⇒ DataSubject
Returns a new instance of DataSubject.
8 9 10 11 12 |
# File 'lib/remi/data_subject.rb', line 8 def initialize(*args, fields: Remi::Fields.new, remi_df_type: :daru, logger: Remi::Settings.logger, **kargs, &block) @fields = fields @remi_df_type = remi_df_type @logger = logger end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
14 15 16 |
# File 'lib/remi/data_subject.rb', line 14 def fields @fields end |
Instance Method Details
#df ⇒ Object
20 21 22 |
# File 'lib/remi/data_subject.rb', line 20 def df @dataframe ||= Remi::DataFrame.create(@remi_df_type, [], order: @fields.keys) end |
#df=(new_dataframe) ⇒ Object
24 25 26 27 28 29 30 |
# File 'lib/remi/data_subject.rb', line 24 def df=(new_dataframe) if new_dataframe.respond_to? :remi_df_type @dataframe = new_dataframe else @dataframe = Remi::DataFrame.create(@remi_df_type, new_dataframe) end end |
#field_symbolizer ⇒ Object
16 17 18 |
# File 'lib/remi/data_subject.rb', line 16 def field_symbolizer Remi::FieldSymbolizers[:standard] end |