lib/authpds/acts_as_authentic/expiration.rb in authpds-1.1.2 vs lib/authpds/acts_as_authentic/expiration.rb in authpds-1.1.3

- old
+ new

@@ -1,19 +1,17 @@ module Authpds module ActsAsAuthentic module Expiration def self.included(klass) - klass.class_eval do - attr_accessor :expiration_date - end + klass.class_eval { attr_accessor :expiration_date } end # Returns a boolean based on whether the User has been refreshed recently. - # If User#refreshed_at is older than User#expiration_date, the User is expired and the data - # may need to be refreshed. + # If User#refreshed_at is older than User#expiration_date, + # the User is expired and the data may need to be refreshed. def expired? # If the record is older than the expiration date, it is expired. (refreshed_at.nil?) ? true : refreshed_at < expiration_date end end end -end \ No newline at end of file +end