lib/sportradar/api/nfl/player.rb in sportradar-api-0.9.20 vs lib/sportradar/api/nfl/player.rb in sportradar-api-0.9.21

- old
+ new

@@ -37,9 +37,13 @@ end def name preferred_name ? [(preferred_name || first_name), last_name].join(' ') : full_name end + def display_name + preferred_name ? [preferred_name, last_name].join(' ') : name + end + def age if birth_date.present? now = Time.now.utc.to_date dob = birth_date.to_date now.year - dob.year - ((now.month > dob.month || (now.month == dob.month && now.day >= dob.day)) ? 0 : 1)