lib/actv/asset.rb in actv-1.3.0 vs lib/actv/asset.rb in actv-1.3.2
- old
+ new
@@ -41,9 +41,15 @@
alias currency_code currencyCd
alias minimum_age regReqMinAge
alias maximum_age regReqMaxAge
alias required_gender regReqGenderCd
+ def endurance_id
+ if self.awendurance?
+ Addressable::URI.parse(registrationUrlAdr.to_s).query_values.to_h.fetch 'e', nil
+ end
+ end
+
def recurrences
@recurrences ||= Array(@attrs[:activityRecurrences]).map do | recurrence |
ACTV::Recurrence.new(recurrence)
end
end