Sha256: 33908f826a1ca2cb8da1b92cab2a7e720c8ed7783a12bc8fe6e8039ae8495e59

Contents?: true

Size: 282 Bytes

Versions: 17

Compression:

Stored size: 282 Bytes

Contents

# frozen_string_literal: true
module Dato
  module Local
    module FieldType
      class Links < Array
        def self.parse(ids, repo)
          new(ids.map { |id| repo.find(id) })
        end

        def to_hash
          map(&:to_hash)
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
dato-0.3.2 lib/dato/local/field_type/links.rb
dato-0.3.1 lib/dato/local/field_type/links.rb
dato-0.3.0 lib/dato/local/field_type/links.rb
dato-0.2.7 lib/dato/local/field_type/links.rb
dato-0.2.6 lib/dato/local/field_type/links.rb
dato-0.2.4 lib/dato/local/field_type/links.rb
dato-0.1.31 lib/dato/local/field_type/links.rb
dato-0.1.30 lib/dato/local/field_type/links.rb
dato-0.1.29 lib/dato/local/field_type/links.rb
dato-0.1.28 lib/dato/local/field_type/links.rb
dato-0.1.27 lib/dato/local/field_type/links.rb
dato-0.1.26 lib/dato/local/field_type/links.rb
dato-0.1.25 lib/dato/local/field_type/links.rb
dato-0.1.24 lib/dato/local/field_type/links.rb
dato-0.1.23 lib/dato/local/field_type/links.rb
dato-0.1.22 lib/dato/local/field_type/links.rb
dato-0.1.21 lib/dato/local/field_type/links.rb