Sha256: 490d8fc9558ad63f2c340ecebdf26a3e187e26ca20438834c11c1c417f6ee119

Contents?: true

Size: 307 Bytes

Versions: 8

Compression:

Stored size: 307 Bytes

Contents

# frozen_string_literal: true

module Gamefic
  module Scope
    # A query scope that matches the entity's siblings, i.e., the other
    # entities that share its parent.
    #
    class Siblings < Base
      def matches
        context.parent.children - [context]
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
gamefic-3.6.0 lib/gamefic/scope/siblings.rb
gamefic-3.5.0 lib/gamefic/scope/siblings.rb
gamefic-3.4.0 lib/gamefic/scope/siblings.rb
gamefic-3.3.0 lib/gamefic/scope/siblings.rb
gamefic-3.2.1 lib/gamefic/scope/siblings.rb
gamefic-3.2.0 lib/gamefic/scope/siblings.rb
gamefic-3.1.0 lib/gamefic/scope/siblings.rb
gamefic-3.0.0 lib/gamefic/scope/siblings.rb