class Dato::Local::FieldType::Links
Public Class Methods
parse(ids, repo)
click to toggle source
# File lib/dato/local/field_type/links.rb, line 7 def self.parse(ids, repo) items = if ids ids.map { |id| repo.find(id) } else [] end new(items) end
Public Instance Methods
to_hash(max_depth = 3, current_depth = 0)
click to toggle source
# File lib/dato/local/field_type/links.rb, line 16 def to_hash(max_depth = 3, current_depth = 0) map { |item| item.to_hash(max_depth, current_depth) } end