Class: PPE_API::Dataset

Inherits:
Object
  • Object
show all
Includes:
HappyMapper
Defined in:
lib/ppe_api/dataset.rb

Instance Method Summary collapse

Instance Method Details

#==(data) ⇒ Object



13
14
15
16
# File 'lib/ppe_api/dataset.rb', line 13

def ==(data)
  return false if data.nil?
  data.author==self.author && data.year = self.year && data.citation==self.citation && self.user.id == data.user.id
end

#to_xml(options = {}) ⇒ Object



18
19
20
# File 'lib/ppe_api/dataset.rb', line 18

def to_xml(options={})
  self.as_json.to_xml({:root => "dataset"}.merge(options))
end