Sha256: a8b7d4f31d0dcda1a3903a4dfba155d52ee7dc4f6640510ea14b416cdfc1f8e4
Contents?: true
Size: 725 Bytes
Versions: 11
Compression:
Stored size: 725 Bytes
Contents
# frozen_string_literal: true module Dato module Local module FieldType class Seo attr_reader :title, :description def self.parse(value, repo) value && new(value[:title], value[:description], value[:image], repo) end def initialize(title, description, image, repo) @title = title @description = description @image = image @repo = repo end def image @image && File.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
11 entries across 11 versions & 1 rubygems