lib/wechat/api/js_ticket.rb in wechat-api-0.4.0 vs lib/wechat/api/js_ticket.rb in wechat-api-0.4.1
- old
+ new
@@ -7,11 +7,11 @@
@client = client
end
def refresh
js = client.js_ticket
- @ticket = js[:ticket]
- @expires_at = DateTime.now + Rational(js[:expires_in].to_i, 3600*24)
+ @ticket = js['ticket']
+ @expires_at = DateTime.now + Rational(js['expires_in'].to_i, 3600 * 24)
self
end
def expired?
expires_at.nil? || DateTime.now > expires_at