class NexosisApi::DatasetData

class to hold the parsed results of a dataset

Attributes

data[RW]

The hash of data values from the dataset @return [NexosisApi::PagedArray of Hash] where each hash contains the dataset data

is_timeseries[R]

Whether or not this dataset was loaded with a date-based key with a timestamp role @return [Boolean] @since 2.1.1

Public Class Methods

new(data_hash) click to toggle source
# File lib/nexosis_api/dataset_data.rb, line 4
def initialize(data_hash)
  data_hash.each do |k, v|
    if (k == 'data')
      @data = NexosisApi::PagedArray.new(data_hash, v)
    elsif (k == 'links')
      @links = v.reject(&:nil?).map { |l| NexosisApi::Link.new(l) }
    elsif (k == 'isTimeSeries')
      @is_timeseries = v
    end
  end
end