Class: Quandl::Cassinatra::Model::Multiset

Inherits:
Object
  • Object
show all
Includes:
Concerns::Properties, Dataset::Searchable
Defined in:
lib/quandl/cassinatra/model/multiset.rb

Instance Method Summary collapse

Instance Method Details

#data_tableObject



20
21
22
# File 'lib/quandl/cassinatra/model/multiset.rb', line 20

def data_table
  Data::Table.new( self.data || [] )
end

#dataset_attribute(*args) ⇒ Object



23
24
25
26
27
28
29
30
# File 'lib/quandl/cassinatra/model/multiset.rb', line 23

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