Sha256: 5b98b8c25697aa1ecb967da6fc903ba2bb61ac8a25982b2d74f5f0d792bfd61b
Contents?: true
Size: 750 Bytes
Versions: 15
Compression:
Stored size: 750 Bytes
Contents
require 'quandl/cassinatra/model/dataset/searchable' module Quandl module Cassinatra module Model class Dataset include Concerns::Properties include Searchable attributes :id, :column_ids, :data delegate :columns_count, :created_at, :frequency, :rows_count, :type, :updated_at, to: :dataset_attribute def data_table Data::Table.new( self.data || [] ) end def data_table=(value) self.data = Data::Table.new(value).to_csv end def dataset_attribute(*args) return @dataset_attribute if @dataset_attribute # options options = args.extract_options! count = options[:count] == true # grab dataset_attribute @dataset_attribute = DatasetAttribute.where( count: count ).find(id) end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems