module Kernel def to_json: (*untyped) -> String end module Gem class Specification attr_reader version (): Version attr_reader gem_dir (): String def self.find_by_name: (String name, ?String? version) -> instance end end class OptionParser def initialize: () ?{ (instance) -> void } -> void def on: (*String) { (String) -> void } -> void attr_accessor version: String attr_accessor banner: String def order!: (Array[String]) -> void def parse!: (Array[String]) -> void def ver: () -> String def help: () -> String end