Class: Jumbotron::Deserializers::Clients::Espn::Season

Inherits:
Object
  • Object
show all
Defined in:
app/deserializers/jumbotron/deserializers/clients/espn/season.rb

Defined Under Namespace

Classes: Result

Class Method Summary collapse

Class Method Details

.call(payload) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'app/deserializers/jumbotron/deserializers/clients/espn/season.rb', line 14

def self.call(payload)
  Support.ensure_hash!(payload, label: "season")

  Result.build!(
    year: Support.payload.fetch(payload, "year"),
    type: Support.payload.fetch(payload, "type"),
    slug: Support.payload.fetch(payload, "slug")
  )
end