Class: RubyUtils::DataRepository
- Inherits:
-
Object
- Object
- RubyUtils::DataRepository
- Defined in:
- lib/ruby_utils/data_repository.rb
Overview
This class serves as a data repository storing the read data and handling the meta information
Instance Attribute Summary collapse
-
#meta_data ⇒ MetaData
readonly
The meta data of the dataset.
-
#repository ⇒ Array
readonly
An array containing all datasets.
Instance Method Summary collapse
-
#add_data_entry(entry) ⇒ Object
reads the file and creates meta information and data of its content.
-
#initialize(meta_data) ⇒ DataRepository
constructor
initialization.
Constructor Details
#initialize(meta_data) ⇒ DataRepository
initialization
15 16 17 18 |
# File 'lib/ruby_utils/data_repository.rb', line 15 def initialize() @meta_data = @repository = Array.new() end |
Instance Attribute Details
#meta_data ⇒ MetaData (readonly)
Returns the meta data of the dataset.
9 10 11 |
# File 'lib/ruby_utils/data_repository.rb', line 9 def @meta_data end |
#repository ⇒ Array (readonly)
Returns an array containing all datasets.
11 12 13 |
# File 'lib/ruby_utils/data_repository.rb', line 11 def repository @repository end |
Instance Method Details
#add_data_entry(entry) ⇒ Object
reads the file and creates meta information and data of its content
22 23 24 25 |
# File 'lib/ruby_utils/data_repository.rb', line 22 def add_data_entry(entry) @repository << entry return nil end |