Sha256: 837b6a0592c780f0f0ac89c243b6c8ef85d3083cf04a57fd19d298d76b5b1f75
Contents?: true
Size: 443 Bytes
Versions: 3
Compression:
Stored size: 443 Bytes
Contents
module Adtraction module Api module Models class Channel include Virtus.model attribute :id, Integer attribute :name, String def self.parse(data) data&.collect { |item| self.new(id: item.fetch("channelId")&.to_i, name: item.fetch("channelName")) } end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
adtraction-api-0.1.3 | lib/adtraction/api/models/channel.rb |
adtraction-api-0.1.2 | lib/adtraction/api/models/channel.rb |
adtraction-api-0.1.0 | lib/adtraction/api/models/channel.rb |