class Agave::Local::FieldType::Seo

Attributes

description[R]
title[R]

Public Class Methods

new(title, description, image, repo) click to toggle source
# File lib/agave/local/field_type/seo.rb, line 12
def initialize(title, description, image, repo)
  @title = title
  @description = description
  @image = image
  @repo = repo
end
parse(value, repo) click to toggle source
# File lib/agave/local/field_type/seo.rb, line 8
def self.parse(value, repo)
  value && new(value[:title], value[:description], value[:image], repo)
end

Public Instance Methods

image() click to toggle source
# File lib/agave/local/field_type/seo.rb, line 19
def image
  @image && File.parse(@image, @repo)
end
to_hash(*args) click to toggle source
# File lib/agave/local/field_type/seo.rb, line 23
def to_hash(*args)
  {
    title: title,
    description: description,
    image: image && image.to_hash(*args)
  }
end