class Agave::Local::FieldType::RichText

Public Class Methods

parse(ids, repo) click to toggle source
# File lib/agave/local/field_type/rich_text.rb, line 6
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/agave/local/field_type/rich_text.rb, line 15
def to_hash(max_depth = 3, current_depth = 0)
  map { |item| item.to_hash(max_depth, current_depth) }
end