Sha256: fc8149b9f20ab84eab72f78e817cc0dfeaab8a13eb2318de0e6232bbf521c9dd
Contents?: true
Size: 820 Bytes
Versions: 12
Compression:
Stored size: 820 Bytes
Contents
# frozen_string_literal: true module Dato module Local module FieldType class Seo attr_reader :title, :description, :twitter_card def self.parse(value, repo) value && new(value[:title], value[:description], value[:image], value[:twitter_card], repo) end def initialize(title, description, image, twitter_card, repo) @title = title @description = description @image = image @repo = repo @twitter_card = twitter_card end def image @image && UploadId.parse(@image, @repo) end def to_hash(*args) { title: title, description: description, image: image && image.to_hash(*args) } end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems