Sha256: f0cd33145ecc42a8224cea00d6b7896d08364d8054cf623e0906e7520b438720

Contents?: true

Size: 1.27 KB

Versions: 49

Compression:

Stored size: 1.27 KB

Contents

module RBS
  class AncestorGraph
    class InstanceNode
      attr_reader type_name: TypeName
      def initialize: (type_name: TypeName) -> void
    end

    class SingletonNode
      attr_reader type_name: TypeName
      def initialize: (type_name: TypeName) -> void
    end

    type node = InstanceNode | SingletonNode

    attr_reader env: Environment
    attr_reader ancestor_builder: DefinitionBuilder::AncestorBuilder
    attr_reader parents: Hash[node, Set[node]]
    attr_reader children: Hash[node, Set[node]]

    def initialize: (env: Environment, ?ancestor_builder: DefinitionBuilder::AncestorBuilder) -> void

    def build: () -> void

    def each_parent: (node) { (node) -> void } -> void
                   | (node) -> Enumerator[node, void]

    def each_ancestor: (node, ?yielded: Set[node]) { (node) -> void } -> void
                     | (node) -> Enumerator[node, void]

    def each_child: (node) { (node) -> void } -> void
                  | (node) -> Enumerator[node, void]

    def each_descendant: (node, ?yielded: Set[node]) { (node) -> void } -> void
                       | (node) -> Enumerator[node, void]

    def build_ancestors: (node, DefinitionBuilder::AncestorBuilder::OneAncestors) -> void

    def register: (parent: node, child: node) -> void
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
rbs-1.4.0 sig/ancestor_graph.rbs
rbs-1.3.3 sig/ancestor_graph.rbs
rbs-1.3.2 sig/ancestor_graph.rbs
rbs-1.3.1 sig/ancestor_graph.rbs
rbs-1.3.0 sig/ancestor_graph.rbs
rbs-1.2.1 sig/ancestor_graph.rbs
rbs-1.2.0 sig/ancestor_graph.rbs
rbs-1.1.1 sig/ancestor_graph.rbs
rbs-1.1.0 sig/ancestor_graph.rbs