Sha256: 8d0292c698f1891157228bea07046d2975abbee6d87b3a080cbfaed6306e67fa

Contents?: true

Size: 384 Bytes

Versions: 43

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

module Bridgetown
  module Drops
    class RelationsDrop < Drop
      mutable false

      def [](type)
        return nil unless type.to_s.in?(@obj.relation_types)

        @obj.resources_for_type(type)
      end

      def key?(type)
        type.to_s.in?(@obj.relation_types)
      end

      def fallback_data
        {}
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
bridgetown-core-1.3.4 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.3.3 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.3.2 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.3.1 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.3.0 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.3.0.beta3 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.3.0.beta2 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.3.0.beta1 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.2.0 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.2.0.beta5 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.2.0.beta4 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.2.0.beta3 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.2.0.beta2 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.2.0.beta1 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.1.0 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.1.0.beta3 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.1.0.beta2 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.1.0.beta1 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.0.0 lib/bridgetown-core/drops/relations_drop.rb
bridgetown-core-1.0.0.beta3 lib/bridgetown-core/drops/relations_drop.rb