Class: Remi::DataSource::DataFrame
- Inherits:
-
Remi::DataSubject
- Object
- Remi::DataSubject
- Remi::DataSource::DataFrame
- Includes:
- DataStub, Remi::DataSubject::DataSource
- Defined in:
- lib/remi/cucumber/data_source.rb,
lib/remi/data_subject/data_frame.rb
Instance Attribute Summary
Attributes inherited from Remi::DataSubject
Instance Method Summary collapse
-
#extract! ⇒ Object
Public: Called to extract data from the source.
-
#initialize(*args, **kargs, &block) ⇒ DataFrame
constructor
A new instance of DataFrame.
-
#to_dataframe ⇒ Object
Public: Converts extracted data to a dataframe.
Methods included from Remi::DataSubject::DataSource
Methods included from DataStub
#empty_stub_df, #stub_df, #stub_row_array, #stub_values
Methods inherited from Remi::DataSubject
Constructor Details
#initialize(*args, **kargs, &block) ⇒ DataFrame
Returns a new instance of DataFrame.
6 7 8 9 |
# File 'lib/remi/data_subject/data_frame.rb', line 6 def initialize(*args, **kargs, &block) super init_df(*args, **kargs, &block) end |
Instance Method Details
#extract! ⇒ Object
Public: Called to extract data from the source.
Returns data in a format that can be used to create a dataframe.
14 15 16 |
# File 'lib/remi/data_subject/data_frame.rb', line 14 def extract! @extract = @data.transpose end |
#to_dataframe ⇒ Object
Public: Converts extracted data to a dataframe
Returns a Remi::DataFrame
21 22 23 |
# File 'lib/remi/data_subject/data_frame.rb', line 21 def to_dataframe DataFrame.create(@remi_df_type, extract, order: @fields.keys) end |