Class: RGovData::FileDataSet

Inherits:
DataSet
  • Object
show all
Defined in:
lib/rgovdata/service/dataset/file_dataset.rb

Overview

This is the catalog class that describes a generic file service DataSet Currently only handles text files

Direct Known Subclasses

CsvDataSet

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 Generic FileDataSets don’t have attributes, so always return full row

> overrides RGovData::DataSet.attribute_value



18
19
20
# File 'lib/rgovdata/service/dataset/file_dataset.rb', line 18

def attribute_value(row,attribute)
  row
end

#attributesObject

Returns array of attributes that describe the records of the specific entity Generic FileDataSets don’t have attributes, returns a single selector for the row

> overrides RGovData::Dn.attributes



11
12
13
# File 'lib/rgovdata/service/dataset/file_dataset.rb', line 11

def attributes
  ['row']
end