class Rouge::InheritableHash

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/rouge/util.rbs

class Rouge::InheritableHash < Rouge::Hash
  def []: ((Class | Symbol) k) -> (nil | String | Hash)
  def keys: () -> Array[]
  def parent: () -> Hash
end

def [](k)

Experimental RBS support (using type sampling data from the type_fusion project).

type Rouge__InheritableHash_[]_return_value = nil | String | fg | Symbol | fg | Symbol | bg | Symbol

def []: ((Class | Symbol) k) -> Rouge__InheritableHash_[]_return_value

This signature was generated using 299 samples from 2 applications.

def [](k)
  value = super
  return value if own_keys.include?(k)
  value || parent[k]
end

def each(&b)

def each(&b)
  keys.each do |k|
    b.call(k, self[k])
  end
end

def include?(k)

def include?(k)
  super or parent.include?(k)
end

def initialize(parent=nil)

def initialize(parent=nil)
  @parent = parent
end

def keys

Experimental RBS support (using type sampling data from the type_fusion project).

def keys: () ->

This signature was generated using 2 samples from 1 application.

def keys
  keys = own_keys.concat(parent.keys)
  keys.uniq!
  keys
end

def parent

Experimental RBS support (using type sampling data from the type_fusion project).

def parent: () ->

This signature was generated using 124 samples from 2 applications.

def parent
  @parent ||= {}
end