Sha256: 86d4fce99a774f51db7268a2a33cca7d3b264e55d7f1cc0b14243d8956e6ace5

Contents?: true

Size: 170 Bytes

Versions: 5

Compression:

Stored size: 170 Bytes

Contents

module Structural
  module Model
    class HasMany < Association
      def value_of(data)
        data.fetch(key, []).map { |r| type.new(r) }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
structural-0.2.0 lib/structural/model/has_many.rb
structural-0.1.0 lib/structural/model/has_many.rb
structural-0.0.3 lib/structural/model/has_many.rb
structural-0.0.2 lib/structural/model/has_many.rb
structural-0.0.1 lib/structural/model/has_many.rb