Ameba: Fix Naming/PredicateName

This commit is contained in:
syeopite
2024-07-26 19:19:31 -07:00
parent 22b35c453e
commit f66068976e
5 changed files with 24 additions and 8 deletions

View File

@@ -90,7 +90,7 @@ struct SearchVideo
json.field "lengthSeconds", self.length_seconds
json.field "liveNow", self.live_now
json.field "premium", self.premium
json.field "isUpcoming", self.is_upcoming
json.field "isUpcoming", self.upcoming?
if self.premiere_timestamp
json.field "premiereTimestamp", self.premiere_timestamp.try &.to_unix
@@ -109,7 +109,7 @@ struct SearchVideo
to_json(nil, json)
end
def is_upcoming
def upcoming?
premiere_timestamp ? true : false
end
end