mirror of
https://github.com/usetrmnl/trmnl-api.git
synced 2026-04-29 13:35:13 -07:00
Fixed palette model to be a Struct
Necessary since some keys might be missing so this'll ensure those keys default to `nil`. Milestone: patch
This commit is contained in:
@@ -4,7 +4,7 @@ module TRMNL
|
||||
module API
|
||||
module Models
|
||||
# Models the data of the API response.
|
||||
Palette = Data.define :id, :name, :grays, :colors, :framework_class do
|
||||
Palette = Struct.new :id, :name, :grays, :colors, :framework_class do
|
||||
def self.for(attributes) = new(**attributes)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user