demarches-normaliennes/lib/github/releases.rb
2016-06-09 12:23:50 +02:00

11 lines
No EOL
243 B
Ruby

class Github::Releases
def self.latest
release = Hashie::Mash.new JSON.parse(Github::API.latest_release)
return nil if release.nil?
release.published_at = release.published_at.to_date.strftime('%d/%m/%Y')
release
end
end