Sha256: 6b023fa47e1df5c1f0055eaa506d89b7cbbe2a1f05f917d469689e64cef766a4

Contents?: true

Size: 433 Bytes

Versions: 6

Compression:

Stored size: 433 Bytes

Contents

module AgnosticBackend
  module Queryable
    class Attribute < TreeNode
      include AgnosticBackend::Utilities

      attr_reader :name, :parent

      def initialize(name, parent:, context:)
        super([], context)
        @name, @parent = name, parent
      end

      def ==(o)
        super && o.name == name
      end

      def type
        value_for_key(context.index.schema, name).try(:type)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
agnostic_backend-0.9.8 lib/agnostic_backend/queryable/attribute.rb
agnostic_backend-0.9.4 lib/agnostic_backend/queryable/attribute.rb
agnostic_backend-0.9.3 lib/agnostic_backend/queryable/attribute.rb
agnostic_backend-0.9.2 lib/agnostic_backend/queryable/attribute.rb
agnostic_backend-0.9.1 lib/agnostic_backend/queryable/attribute.rb
agnostic_backend-0.9.0 lib/agnostic_backend/queryable/attribute.rb