Class: Mirrored::Update
Class Method Summary collapse
-
.last ⇒ Object
Returns a ruby time object that is equal to the last time you posted something.
Methods inherited from Base
api_url, connection, establish_connection, remove_connection, service, valid_service?
Class Method Details
.last ⇒ Object
7 8 9 10 11 12 |
# File 'lib/mirrored/update.rb', line 7 def self.last result = connection.get('posts/update') doc = Hpricot::XML(result) update = doc.at('update') update ? Time.parse(update['time']) : '' end |