Module: RubyRest::Atom::DummyEntry

Defined in:
lib/rubyrest/atom.rb

Overview

This module provides a failsafe implementation for methods required by RubyRest in order to provide an Atom Entry representation out of a domain object.

Developpers should rather use RubyRest::Atom::Entry or provide their own.

Instance Method Summary collapse

Instance Method Details

#atom_authorObject

Overrides the implementation provided by RubyRest::Atom::Entry



220
221
222
# File 'lib/rubyrest/atom.rb', line 220

def atom_author
  MODULEID
end

#atom_idObject

Generates an id from the current time value



209
210
211
# File 'lib/rubyrest/atom.rb', line 209

def atom_id
  Time.now.to_i
end

#atom_summaryObject

Returns the Atom Entry Summary. Synonym of atom_title



204
205
206
# File 'lib/rubyrest/atom.rb', line 204

def atom_summary
  atom_title
end

#atom_titleObject

Returns the object’s class name



198
199
200
# File 'lib/rubyrest/atom.rb', line 198

def atom_title
  self.class.name
end

#atom_updatedObject

Returns Time.now



214
215
216
# File 'lib/rubyrest/atom.rb', line 214

def atom_updated
  Time.now
end