Sha256: 0b51d772102f7cb572c463f127ccbd74771e9ee1e48193938842f940d90a1bf4

Contents?: true

Size: 1.86 KB

Versions: 3

Compression:

Stored size: 1.86 KB

Contents

interface _ToC
  def to_c: () -> Complex
end

interface _ToR
  def to_r: () -> Rational
end

interface _ToF
  def to_f: () -> Float
end

interface _ToI
  def to_i: () -> Integer
end

interface _ToInt
  def to_int: () -> Integer
end

interface _ToS
  def to_s: () -> String
end

interface _ToStr
  def to_str: () -> String
end

interface _ToSym
  def to_sym: () -> Symbol
end

interface _ToH[K, V]
  def to_h: () -> Hash[K, V]
end

interface _ToHash[K, V]
  def to_hash: () -> Hash[K, V]
end

interface _ToA[T]
  def to_a: () -> Array[T]
end

interface _ToAry[T]
  def to_ary: () -> Array[T]
end

interface _ToProc
  def to_proc: () -> Proc
end

interface _ToPath
  def to_path: () -> String
end

interface _Inspect
  def inspect: () -> String
end

interface _Each[out A]
  def each: () { (A) -> void } -> void
end

interface _EachEntry[out A]
  def each_entry: () { (A) -> void } -> self
end

interface _Reader
  def read: (?int? length, ?string outbuf) -> String?
end

interface _ReaderPartial
  def readpartial: (int maxlen, ?string outbuf) -> String
end

interface _Writer
  # Writes the +data+ string. Returns the number of bytes written
  def write: (*_ToS data) -> Integer
end

interface _Rewindable
  # Positions the stream to the beginning of input, resetting `lineno` to zero.
  #
  def rewind: () -> Integer
end

interface _ToIO
  def to_io: () -> IO
end

interface _Exception
  def exception: () -> Exception
               | (String arg0) -> Exception
end

type int = Integer | _ToInt
type real = Integer | Float | Rational

type string = String | _ToStr
type encoding = Encoding | string
type path = string | _ToPath

type io = IO | _ToIO

# `boolish` is a type for documentation.
# It means the value of this type is only for testing a condition.
# Unlike `bool` type, it doesn't require the value is one of `true` or `false`.
# Any Ruby object can have `boolish` type.
#
type boolish = top

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rbs-3.2.2 core/builtin.rbs
rbs-3.2.1 core/builtin.rbs
rbs-3.2.0 core/builtin.rbs