Class: Quandl::Client::Dataset

Inherits:
Object
  • Object
show all
Defined in:
lib/quandl/client/dataset/to_qdf.rb

Instance Method Summary collapse

Instance Method Details

#qdf_attributesObject



11
12
13
14
15
16
# File 'lib/quandl/client/dataset/to_qdf.rb', line 11

def qdf_attributes
  Quandl::Format::Dataset.attribute_names.inject({}) do |memo, name|
    memo[name] = self.send(name) if self.respond_to?(name)
    memo
  end
end

#to_qdfObject



6
7
8
9
# File 'lib/quandl/client/dataset/to_qdf.rb', line 6

def to_qdf
  return if !exists? && status != 0
  Quandl::Format::Dataset.new( qdf_attributes ).to_qdf
end