Class: RGovData::CsvDataSet

Inherits:
FileDataSet show all
Defined in:
lib/rgovdata/service/dataset/csv_dataset.rb

Overview

This is the catalog class that describes a CSV file service DataSet

Instance Attribute Summary

Attributes inherited from DataSet

#native_service, #options, #service

Instance Method Summary collapse

Methods inherited from DataSet

#dataset_key, #initialize, #limit, #limit=, load_datasets, #meta_attributes, #native_instance, #realm, #records, #service_key, #uri

Methods included from Dn

#id, #initialization_hash, #meta_attributes, #records, #to_param, #to_s

Constructor Details

This class inherits a constructor from RGovData::DataSet

Instance Method Details

#attribute_value(row, attribute) ⇒ Object

Returns the value of the named attribute from a recordset row

> overrides RGovData::DataSet.attribute_value



15
16
17
# File 'lib/rgovdata/service/dataset/csv_dataset.rb', line 15

def attribute_value(row,attribute)
  row[attribute.to_s]
end

#attributesObject

Returns array of attributes that describe the records of the specific entity

> overrides RGovData::Dn.attributes



8
9
10
11
# File 'lib/rgovdata/service/dataset/csv_dataset.rb', line 8

def attributes
  records unless @attributes # forces a load
  @attributes
end