From 89a2ac4e3b3240e85bd26114a337ac12bef89b6c Mon Sep 17 00:00:00 2001 From: HASUMI Hitoshi Date: Tue, 22 Oct 2024 22:39:51 +0900 Subject: [PATCH] update --- _data/sidebars/picoruby_sidebar.yml | 20 ++ pages/rbs_doc/Dir.md | 61 +++--- pages/rbs_doc/EOFError.md | 9 + pages/rbs_doc/Editor_Buffer.md | 39 ++-- pages/rbs_doc/File.md | 17 +- pages/rbs_doc/FileTest.md | 55 ++++++ pages/rbs_doc/File_Constants.md | 9 + pages/rbs_doc/File_Stat.md | 8 +- pages/rbs_doc/IO.md | 265 +++++++++++++++++++++++---- pages/rbs_doc/Kernel.md | 24 +++ pages/rbs_doc/Machine.md | 5 + pages/rbs_doc/MbedTLS_Cipher.md | 51 +++++- pages/rbs_doc/Net_HTTPClient.md | 14 +- pages/rbs_doc/Net_HTTPSClient.md | 14 +- pages/rbs_doc/NotImplementedError.md | 9 + pages/rbs_doc/Object.md | 69 ++++--- pages/rbs_doc/RNG.md | 6 +- pages/rbs_doc/Shell.md | 7 +- pages/rbs_doc/String.md | 11 ++ pages/rbs_doc/Vim.md | 16 +- pages/rbs_doc/type_alias.md | 7 +- 21 files changed, 587 insertions(+), 129 deletions(-) create mode 100644 pages/rbs_doc/EOFError.md create mode 100644 pages/rbs_doc/FileTest.md create mode 100644 pages/rbs_doc/File_Constants.md create mode 100644 pages/rbs_doc/NotImplementedError.md diff --git a/_data/sidebars/picoruby_sidebar.yml b/_data/sidebars/picoruby_sidebar.yml index 7ab0bec..0190e21 100644 --- a/_data/sidebars/picoruby_sidebar.yml +++ b/_data/sidebars/picoruby_sidebar.yml @@ -141,6 +141,10 @@ entries: url: "/NoMethodError.html" output: web pdf type: homepage + - title: class NotImplementedError + url: "/NotImplementedError.html" + output: web pdf + type: homepage - title: class Prism::ParseError url: "/Prism_ParseError.html" output: web pdf @@ -338,6 +342,10 @@ entries: url: "/Dir.html" output: web pdf type: homepage + - title: class EOFError + url: "/EOFError.html" + output: web pdf + type: homepage - title: module Editor url: "/Editor.html" output: web pdf @@ -382,10 +390,18 @@ entries: url: "/File.html" output: web pdf type: homepage + - title: module File::Constants + url: "/File_Constants.html" + output: web pdf + type: homepage - title: class File::Stat url: "/File_Stat.html" output: web pdf type: homepage + - title: class FileTest + url: "/FileTest.html" + output: web pdf + type: homepage - title: class IIRFilter url: "/IIRFilter.html" output: web pdf @@ -490,6 +506,10 @@ entries: url: "/Net_UDPClient.html" output: web pdf type: homepage + - title: class Object + url: "/Object.html" + output: web pdf + type: homepage - title: class PicoLine url: "/PicoLine.html" output: web pdf diff --git a/pages/rbs_doc/Dir.md b/pages/rbs_doc/Dir.md index f63c5fb..f431b3a 100644 --- a/pages/rbs_doc/Dir.md +++ b/pages/rbs_doc/Dir.md @@ -7,27 +7,37 @@ sidebar: picoruby_sidebar permalink: Dir.html folder: rbs_doc --- +## Type aliases +### path_t +```ruby +String +``` ## Singleton methods ### chdir ```ruby -Dir.chdir(?path dir) -> 0 -Dir.chdir[U] (?path dir) { (String dir) -> U } -> U +Dir.chdir(?path_t dir) -> 0 +Dir.chdir[U] (?path_t dir) { (path_t dir) -> U } -> U ``` ### delete ```ruby -Dir.delete(path dirname) -> 0 +Dir.delete(path_t dirname) -> 0 ``` -### empty? +### entries ```ruby -Dir.empty?(path path_name) -> bool +Dir.entries(String dir) -> Array[String] ``` ### exist? ```ruby -Dir.exist?(path) -> bool +Dir.exist?(path_t dirname) -> bool +``` +### foreach + +```ruby +Dir.foreach(String path) { (String path) -> untyped } -> nil ``` ### getwd @@ -37,24 +47,19 @@ Dir.getwd() -> String ### glob ```ruby -Dir.glob(path pattern, ?int flags, ?base: path?) -> Array[String] -Dir.glob(path pattern, ?int flags, ?base: path?) { (String pathname) -> void } -> nil +Dir.glob(path_t pattern, ?int flags, ?base: path?) -> Array[String] +Dir.glob(path_t pattern, ?int flags, ?base: path?) { (String pathname) -> void } -> nil ``` ### mkdir ```ruby -Dir.mkdir(path) -> 0 -``` -### new - -```ruby -Dir.new(path dir) -> VFS::dir_t +Dir.mkdir(path_t dirname, ?Integer mode) -> 0 ``` ### open ```ruby -Dir.open(path dirname) -> VFS::dir_t -Dir.open[U] (path dirname) { (VFS::dir_t) -> U } -> VFS::dir_t +Dir.open(path_t dirname) -> untyped +Dir.open[U] (path_t dirname) { (Dir dir) -> U } -> Dir ``` ## Instance methods ### close @@ -65,22 +70,22 @@ instance.close() -> nil ### each ```ruby -instance.each() { (String) -> void } -> self +instance.each() { (String item) -> untyped} -> self ``` -### findnext +### empty? ```ruby -instance.findnext() -> String? +instance.empty?() -> bool ``` -### pat= +### findnext ```ruby -instance.pat=(path) -> path +instance.findnext() -> Dir ``` -### path +### pat= ```ruby -instance.path() -> String? +instance.pat=(String) -> String ``` ### read @@ -92,3 +97,13 @@ instance.read() -> String? ```ruby instance.rewind() -> self ``` +### seek + +```ruby +instance.seek(Integer pos) -> 0 +``` +### tell + +```ruby +instance.tell() -> Integer +``` diff --git a/pages/rbs_doc/EOFError.md b/pages/rbs_doc/EOFError.md new file mode 100644 index 0000000..ab8f71f --- /dev/null +++ b/pages/rbs_doc/EOFError.md @@ -0,0 +1,9 @@ +--- +title: class EOFError +keywords: EOFError +tags: [class] +summary: EOFError class of PicoRuby +sidebar: picoruby_sidebar +permalink: EOFError.html +folder: rbs_doc +--- diff --git a/pages/rbs_doc/Editor_Buffer.md b/pages/rbs_doc/Editor_Buffer.md index 1f63384..19fdb0a 100644 --- a/pages/rbs_doc/Editor_Buffer.md +++ b/pages/rbs_doc/Editor_Buffer.md @@ -17,52 +17,67 @@ Editor::Buffer.new() -> instance ### bottom ```ruby -instance.bottom-> void +instance.bottom() -> void ``` ### clear ```ruby -instance.clear-> void +instance.clear() -> void ``` ### current_char ```ruby -instance.current_char-> String? +instance.current_char() -> String? ``` ### current_line ```ruby -instance.current_line-> String +instance.current_line() -> String ``` ### current_tail ```ruby instance.current_tail(?Integer n) -> String ``` +### delete + +```ruby +instance.delete() -> void +``` +### delete_line + +```ruby +instance.delete_line() -> (String | nil) +``` ### down ```ruby -instance.down-> void +instance.down() -> void ``` ### dump ```ruby -instance.dump-> String +instance.dump() -> String ``` ### head ```ruby -instance.head-> void +instance.head() -> void ``` ### home ```ruby -instance.home-> void +instance.home() -> void +``` +### insert_line + +```ruby +instance.insert_line(String | nil line) -> void ``` ### left ```ruby -instance.left-> void +instance.left() -> void ``` ### put @@ -72,17 +87,17 @@ instance.put(String | Symbol c) -> void ### right ```ruby -instance.right-> void +instance.right() -> void ``` ### tail ```ruby -instance.tail-> void +instance.tail() -> void ``` ### up ```ruby -instance.up-> void +instance.up() -> void ``` ## Attr accessors ### lines (accessor) diff --git a/pages/rbs_doc/File.md b/pages/rbs_doc/File.md index 95d1079..3efca14 100644 --- a/pages/rbs_doc/File.md +++ b/pages/rbs_doc/File.md @@ -8,6 +8,11 @@ permalink: File.html folder: rbs_doc --- ## Singleton methods +### basename + +```ruby +File.basename(String filename) -> String +``` ### chmod ```ruby @@ -33,16 +38,22 @@ File.expand_path(string, ?string) -> String ```ruby File.file?(string) -> bool ``` +### join + +```ruby +File.join(*String parts) -> String +``` ### new ```ruby -File.new(string, ?string mode) -> VFS::file_t +File.new(string fd_or_path, ?string mode, ?int perm) -> File +File.new[T] (string fd_or_path, ?string mode, ?int perm) { (untyped) -> T } -> untyped ``` ### open ```ruby -File.open(string, ?string) -> VFS::file_t -File.open[T] (string, ?string) { (VFS::file_t) -> T } -> untyped +File.open(string, ?string) -> File +File.open[T] (string, ?string) { (untyped) -> T } -> untyped ``` ### rename diff --git a/pages/rbs_doc/FileTest.md b/pages/rbs_doc/FileTest.md new file mode 100644 index 0000000..d5929ab --- /dev/null +++ b/pages/rbs_doc/FileTest.md @@ -0,0 +1,55 @@ +--- +title: class FileTest +keywords: FileTest +tags: [class] +summary: FileTest class of PicoRuby +sidebar: picoruby_sidebar +permalink: FileTest.html +folder: rbs_doc +--- +## Singleton methods +### directory? + +```ruby +FileTest.directory?(String file) -> bool +``` +### exist? + +```ruby +FileTest.exist?(String file) -> bool +``` +### file? + +```ruby +FileTest.file?(String file) -> bool +``` +### pipe? + +```ruby +FileTest.pipe?(String file) -> bool +``` +### size + +```ruby +FileTest.size(String |nil file) -> Integer +``` +### size? + +```ruby +FileTest.size?(String file) -> (Integer | nil) +``` +### socket? + +```ruby +FileTest.socket?(String file) -> bool +``` +### symlink? + +```ruby +FileTest.symlink?(String file) -> bool +``` +### zero? + +```ruby +FileTest.zero?(String file) -> bool +``` diff --git a/pages/rbs_doc/File_Constants.md b/pages/rbs_doc/File_Constants.md new file mode 100644 index 0000000..00e6f7e --- /dev/null +++ b/pages/rbs_doc/File_Constants.md @@ -0,0 +1,9 @@ +--- +title: module File::Constants +keywords: File::Constants +tags: [module] +summary: File::Constants module of PicoRuby +sidebar: picoruby_sidebar +permalink: File_Constants.html +folder: rbs_doc +--- diff --git a/pages/rbs_doc/File_Stat.md b/pages/rbs_doc/File_Stat.md index 0d91ba3..58b387b 100644 --- a/pages/rbs_doc/File_Stat.md +++ b/pages/rbs_doc/File_Stat.md @@ -17,7 +17,7 @@ File::Stat.new(String file) -> instance ### birthtime ```ruby -instance.birthtime() -> Time +instance.birthtime() -> (Time | nil) ``` ### directory? @@ -27,12 +27,12 @@ instance.directory?() -> bool ### mode ```ruby -instance.mode() -> Integer +instance.mode() -> (Integer | nil) ``` ### mode_str ```ruby -instance.mode_str() -> String +instance.mode_str() -> (String | nil) ``` ### mtime @@ -47,5 +47,5 @@ instance.size() -> Integer ### writable? ```ruby -instance.writable?() -> bool +instance.writable?() -> boolish ``` diff --git a/pages/rbs_doc/IO.md b/pages/rbs_doc/IO.md index 4f1d32a..ab477fe 100644 --- a/pages/rbs_doc/IO.md +++ b/pages/rbs_doc/IO.md @@ -7,42 +7,240 @@ sidebar: picoruby_sidebar permalink: IO.html folder: rbs_doc --- +## Type aliases +### fd_t +```ruby +Integer | IO +``` +## Singleton methods +### new + +```ruby +IO.new(*Object args) ?{ (untyped) -> untyped } -> IO +``` +### open + +```ruby +IO.open(*Object args) -> IO +IO.open(*Object args) { (IO) -> untyped } -> untyped +``` +### pipe + +```ruby +IO.pipe() -> [IO, IO] +IO.pipe{ (IO, IO) -> void } -> untyped +``` +### popen + +```ruby +IO.popen(String command, ?String mode, ?in: fd_t, ?out: fd_t, ?err: fd_t) -> IO +IO.popen(String command, ?String mode, ?in: fd_t, ?out: fd_t, ?err: fd_t) { (IO) -> untyped } -> untyped +``` +### select + +```ruby +IO.select(Array[fd_t] readfds, ?Array[fd_t] writefds, ?Array[fd_t] exceptfds, ?Integer timeout) -> ([[IO]] | nil) +``` +### sysopen + +```ruby +IO.sysopen(String path, ?String mode, ?Integer perm) -> Integer +``` ## Instance methods ### << ```ruby -instance.<<(untyped) -> self +instance.<<(String input) -> self +``` +### close + +```ruby +instance.close() -> nil +``` +### close_on_exec= + +```ruby +instance.close_on_exec=(bool) -> bool +``` +### close_on_exec? + +```ruby +instance.close_on_exec?() -> bool +``` +### close_write + +```ruby +instance.close_write() -> nil +``` +### closed? + +```ruby +instance.closed?() -> bool +``` +### each + +```ruby +instance.each() ?{ (String) -> void } -> self +``` +### each_byte + +```ruby +instance.each_byte() ?{ (Integer) -> void } -> self +``` +### each_char + +```ruby +instance.each_char() ?{ (String) -> void } -> self +``` +### eof? + +```ruby +instance.eof?() -> bool +``` +### fileno + +```ruby +instance.fileno() -> Integer ``` ### flush ```ruby -instance.flush-> self +instance.flush() -> self ``` -### getch +### getbyte ```ruby -instance.getch-> String +instance.getbyte() -> (Integer | nil) ``` -### iflush +### getc ```ruby -instance.iflush-> self +instance.getc() -> (String | nil) ``` -### noecho +### gets ```ruby -instance.noecho() { (untyped) -> untyped } -> untyped +instance.gets(?String rs, ?Integer limit) -> (String | nil) ``` -### raw +### isatty ```ruby -instance.raw() { (untyped) -> untyped } -> untyped +instance.isatty() -> bool ``` -## Instance methods -### read_nonblock +### path= ```ruby -instance.read_nonblock(Integer maxlen) -> String +instance.path=(string) -> string +``` +### pid + +```ruby +instance.pid() -> (Integer | nil) +``` +### pos + +```ruby +instance.pos() -> Integer +``` +### pos= + +```ruby +instance.pos=(Integer) -> Integer +``` +### pread + +```ruby +instance.pread(Integer length, Integer offset, ?String outbuf) -> String +``` +### print + +```ruby +instance.print(*_ToS args) -> nil +``` +### printf + +```ruby +instance.printf(*String str) -> nil +``` +### puts + +```ruby +instance.puts(*_ToS line) -> nil +``` +### pwrite + +```ruby +instance.pwrite(String input, Integer offset) -> Integer +``` +### read + +```ruby +instance.read(?(Integer | nil) length, ?String outbuf) -> (String | nil) +``` +### readbyte + +```ruby +instance.readbyte() -> Integer +``` +### readchar + +```ruby +instance.readchar() -> String +``` +### readline + +```ruby +instance.readline(?String sep, ?Integer limit) -> String +``` +### readlines + +```ruby +instance.readlines(?String sep, ?Integer limit) -> Array[String] +``` +### rewind + +```ruby +instance.rewind() -> Integer +``` +### seek + +```ruby +instance.seek(Integer offset, ?Integer whence) -> Integer +``` +### sync + +```ruby +instance.sync() -> bool +``` +### sync= + +```ruby +instance.sync=(bool) -> bool +``` +### sysread + +```ruby +instance.sysread(Integer length, ?String outbuf) -> String +``` +### syswrite + +```ruby +instance.syswrite(String input) -> Integer +``` +### ungetbyte + +```ruby +instance.ungetbyte(String | Integer byte) -> nil +``` +### ungetc + +```ruby +instance.ungetc(String char) -> nil +``` +### write + +```ruby +instance.write(String input) -> Integer ``` ## Singleton methods ### clear_screen @@ -50,53 +248,54 @@ instance.read_nonblock(Integer maxlen) -> String ```ruby IO.clear_screen() -> nil ``` -### cooked! +### get_cursor_position ```ruby -IO.cooked!-> self +IO.get_cursor_position-> ([Integer, Integer]) ``` -### get_cursor_position +### wait_terminal ```ruby -IO.get_cursor_position-> ([Integer, Integer]) +IO.wait_terminal(?timeout: Integer|Float|nil) -> bool ``` -### get_nonblock +## Instance methods +### cooked ```ruby -IO.get_nonblock(Integer) -> String? +instance.cooked() { (IO io) -> untyped } -> untyped ``` -### getc +### cooked! ```ruby -IO.getc-> String? +instance.cooked!() -> self ``` -### getch +### echo= ```ruby -IO.getch-> String +instance.echo=(bool mode) -> bool ``` -### gets +### echo? ```ruby -IO.gets-> String +instance.echo?() -> bool ``` -### raw +### getch ```ruby -IO.raw() { () -> untyped } -> untyped +instance.getch() -> String ``` -### raw! +### raw ```ruby -IO.raw!-> self +instance.raw() { (IO io) -> untyped } -> untyped ``` -### read_nonblock +### raw! ```ruby -IO.read_nonblock(Integer) -> String +instance.raw!() -> self ``` -### wait_terminal +### read_nonblock ```ruby -IO.wait_terminal(?timeout: Integer|Float|nil) -> bool +instance.read_nonblock(Integer maxlen) -> String ``` diff --git a/pages/rbs_doc/Kernel.md b/pages/rbs_doc/Kernel.md index 91093f8..8336f96 100644 --- a/pages/rbs_doc/Kernel.md +++ b/pages/rbs_doc/Kernel.md @@ -8,6 +8,30 @@ permalink: Kernel.html folder: rbs_doc --- ## Instance methods +### p + +```ruby +instance.p[T < _Inspect] (T arg0) -> T +instance.p(_Inspect arg0, _Inspect arg1, *_Inspect rest) -> _Inspect +instance.p() -> nil +``` +### print + +```ruby +instance.print(*_ToS args) -> nil +``` +### printf + +```ruby +instance.printf() -> nil +instance.printf(String fmt, *untyped args) -> nil +``` +### puts + +```ruby +instance.puts(*_ToS objects) -> nil +``` +## Instance methods ### system ```ruby diff --git a/pages/rbs_doc/Machine.md b/pages/rbs_doc/Machine.md index 24a1d4d..cd33d37 100644 --- a/pages/rbs_doc/Machine.md +++ b/pages/rbs_doc/Machine.md @@ -28,6 +28,11 @@ Machine.delay_ms(Integer ms) -> Integer ```ruby Machine.sleep(Integer sec) -> Integer ``` +### unique_id + +```ruby +Machine.unique_id() -> String +``` ### using_busy_wait ```ruby diff --git a/pages/rbs_doc/MbedTLS_Cipher.md b/pages/rbs_doc/MbedTLS_Cipher.md index 85f6532..335c29b 100644 --- a/pages/rbs_doc/MbedTLS_Cipher.md +++ b/pages/rbs_doc/MbedTLS_Cipher.md @@ -10,22 +10,23 @@ folder: rbs_doc ## Type aliases ### cipher_t ```ruby -:aes_128_cbc - | :aes_192_cbc - | :aes_256_cbc - | :aes_128_gcm - | :aes_192_gcm - | :aes_256_gcm +"AES-128-CBC" + | "AES-192-CBC" + | "AES-256-CBC" + | "AES-128-GCM" + | "AES-192-GCM" + | "AES-256-GCM" ``` -### operation_t +## Singleton methods +### ciphers + ```ruby -:encrypt | :decrypt +MbedTLS::Cipher.ciphers() -> Array[cipher_t] ``` -## Singleton methods ### new ```ruby -MbedTLS::Cipher.new(cipher_t cipher_suite, String key, operation_t operation) -> MbedTLS::Cipher +MbedTLS::Cipher.new(cipher_t cipher_suite) -> MbedTLS::Cipher ``` ## Instance methods ### check_tag @@ -33,11 +34,41 @@ MbedTLS::Cipher.new(cipher_t cipher_suite, String key, operation_t operation) -> ```ruby instance.check_tag(String tag) -> bool ``` +### decrypt + +```ruby +instance.decrypt() -> MbedTLS::Cipher +``` +### encrypt + +```ruby +instance.encrypt() -> MbedTLS::Cipher +``` ### finish ```ruby instance.finish() -> String ``` +### iv= + +```ruby +instance.iv=(String iv) -> String +``` +### iv_len + +```ruby +instance.iv_len() -> Integer +``` +### key= + +```ruby +instance.key=(String key) -> String +``` +### key_len + +```ruby +instance.key_len() -> Integer +``` ### update ```ruby diff --git a/pages/rbs_doc/Net_HTTPClient.md b/pages/rbs_doc/Net_HTTPClient.md index 0cfa475..ef34b6e 100644 --- a/pages/rbs_doc/Net_HTTPClient.md +++ b/pages/rbs_doc/Net_HTTPClient.md @@ -7,24 +7,30 @@ sidebar: picoruby_sidebar permalink: Net_HTTPClient.html folder: rbs_doc --- +## Singleton methods +### new + +```ruby +Net::HTTPClient.new(String host) -> void +``` ## Instance methods ### get ```ruby -instance.get(String) -> (httpreturn | nil) +instance.get(String path) -> (httpreturn | nil) ``` ### get_with_headers ```ruby -instance.get_with_headers(String, Hash[String, String]) -> (httpreturn | nil) +instance.get_with_headers(String path, header_t headers) -> (httpreturn | nil) ``` ### post ```ruby -instance.post(String, Hash[String, String], String) -> (httpreturn | nil) +instance.post(String path, header_t headers, String body) -> (httpreturn | nil) ``` ### put ```ruby -instance.put(String, Hash[String, String], String) -> (httpreturn | nil) +instance.put(String path, header_t headers, String body) -> (httpreturn | nil) ``` diff --git a/pages/rbs_doc/Net_HTTPSClient.md b/pages/rbs_doc/Net_HTTPSClient.md index 431fff3..d0ebab8 100644 --- a/pages/rbs_doc/Net_HTTPSClient.md +++ b/pages/rbs_doc/Net_HTTPSClient.md @@ -7,24 +7,30 @@ sidebar: picoruby_sidebar permalink: Net_HTTPSClient.html folder: rbs_doc --- +## Singleton methods +### new + +```ruby +Net::HTTPSClient.new(String host) -> void +``` ## Instance methods ### get ```ruby -instance.get(String) -> (httpreturn | nil) +instance.get(String path) -> (httpreturn | nil) ``` ### get_with_headers ```ruby -instance.get_with_headers(String, Hash[String, String]) -> (httpreturn | nil) +instance.get_with_headers(String path, header_t headers) -> (httpreturn | nil) ``` ### post ```ruby -instance.post(String, Hash[String, String], String) -> (httpreturn | nil) +instance.post(String path, header_t headers, String body) -> (httpreturn | nil) ``` ### put ```ruby -instance.put(String, Hash[String, String], String) -> (httpreturn | nil) +instance.put(String path, header_t headers, String body) -> (httpreturn | nil) ``` diff --git a/pages/rbs_doc/NotImplementedError.md b/pages/rbs_doc/NotImplementedError.md new file mode 100644 index 0000000..8b93f78 --- /dev/null +++ b/pages/rbs_doc/NotImplementedError.md @@ -0,0 +1,9 @@ +--- +title: class NotImplementedError +keywords: NotImplementedError +tags: [class] +summary: NotImplementedError class of PicoRuby +sidebar: picoruby_sidebar +permalink: NotImplementedError.html +folder: rbs_doc +--- diff --git a/pages/rbs_doc/Object.md b/pages/rbs_doc/Object.md index 2cb3fb5..8be8ebf 100644 --- a/pages/rbs_doc/Object.md +++ b/pages/rbs_doc/Object.md @@ -7,6 +7,47 @@ sidebar: picoruby_sidebar permalink: Object.html folder: rbs_doc --- +## Instance methods +### __id__ + +```ruby +instance.__id__() -> Integer +``` +### instance_of? + +```ruby +instance.instance_of?(Class klass) -> bool +``` +### instance_variable_get + +```ruby +instance.instance_variable_get(Symbol name) -> Object +``` +### instance_variable_set + +```ruby +instance.instance_variable_set(Symbol name, Object value) -> Object +``` +### instance_variables + +```ruby +instance.instance_variables() -> Array[Symbol] +``` +### methods + +```ruby +instance.methods() -> Array[Symbol] +``` +### respond_to? + +```ruby +instance.respond_to?(Symbol | String name) -> bool +``` +### send + +```ruby +instance.send(Symbol | String name, *Object args) -> Object +``` ## Instance methods (picoruby-require) ### load @@ -84,34 +125,6 @@ instance.loop() { () -> void }-> void ```ruby instance.nil?() -> bool ``` -### object_id - -```ruby -instance.object_id() -> Integer -``` -### p - -```ruby -instance.p[T < _Inspect] (T arg0) -> T -instance.p(_Inspect arg0, _Inspect arg1, *_Inspect rest) -> Array[_Inspect] -instance.p() -> nil -``` -### print - -```ruby -instance.print(*_ToS args) -> nil -``` -### printf - -```ruby -instance.printf() -> nil -instance.printf(String fmt, *untyped args) -> nil -``` -### puts - -```ruby -instance.puts(*_ToS objects) -> nil -``` ### raise ```ruby diff --git a/pages/rbs_doc/RNG.md b/pages/rbs_doc/RNG.md index a07f667..98128f2 100644 --- a/pages/rbs_doc/RNG.md +++ b/pages/rbs_doc/RNG.md @@ -11,15 +11,15 @@ folder: rbs_doc ### random_int ```ruby -RNG.random_int-> Integer +RNG.random_int() -> Integer ``` ### random_string ```ruby -RNG.random_string(Integer) -> String +RNG.random_string(Integer length) -> String ``` ### uuid ```ruby -RNG.uuid-> String +RNG.uuid() -> String ``` diff --git a/pages/rbs_doc/Shell.md b/pages/rbs_doc/Shell.md index a2404e1..62fae70 100644 --- a/pages/rbs_doc/Shell.md +++ b/pages/rbs_doc/Shell.md @@ -29,6 +29,11 @@ Shell.setup_rtc(rtc_t trc) -> void Shell.setup_sdcard(SPI spi) -> void ``` ## Instance methods +### bootstrap + +```ruby +instance.bootstrap(String file) -> bool +``` ### run_irb ```ruby @@ -47,7 +52,7 @@ instance.setup_root_volume(Symbol drive, ?label: String) -> void ### setup_system_files ```ruby -instance.setup_system_files(?force: bool) -> void +instance.setup_system_files(?(String | nil) root, ?force: bool) -> void ``` ### show_logo diff --git a/pages/rbs_doc/String.md b/pages/rbs_doc/String.md index 6bcf607..b683ae1 100644 --- a/pages/rbs_doc/String.md +++ b/pages/rbs_doc/String.md @@ -7,6 +7,17 @@ sidebar: picoruby_sidebar permalink: String.html folder: rbs_doc --- +## Instance methods +### gsub + +```ruby +instance.gsub(String pattern, String replacement) -> String +``` +### rindex + +```ruby +instance.rindex(String needle) -> (Integer | nil) +``` ## Singleton methods ### pack diff --git a/pages/rbs_doc/Vim.md b/pages/rbs_doc/Vim.md index f76f65b..43aeb53 100644 --- a/pages/rbs_doc/Vim.md +++ b/pages/rbs_doc/Vim.md @@ -7,13 +7,23 @@ sidebar: picoruby_sidebar permalink: Vim.html folder: rbs_doc --- +## Type aliases +### mode_t +```ruby +:command | :insert | :normal | :visual | :visual_line | :visual_block | :cut +``` ## Singleton methods ### new ```ruby -Vim.new(String filepath) -> instance +Vim.new(String | nil filepath) -> instance ``` ## Instance methods +### clear_command_buffer + +```ruby +instance.clear_command_buffer() -> void +``` ### exec_command ```ruby @@ -22,10 +32,10 @@ instance.exec_command(Editor::Buffer buffer) -> (:quit | String | nil) ### save_file ```ruby -instance.save_file-> String +instance.save_file() -> String ``` ### start ```ruby -instance.start-> void +instance.start() -> void ``` diff --git a/pages/rbs_doc/type_alias.md b/pages/rbs_doc/type_alias.md index 149afaf..abb3018 100644 --- a/pages/rbs_doc/type_alias.md +++ b/pages/rbs_doc/type_alias.md @@ -5,11 +5,16 @@ permalink: /type_alias.html folder: rbs_doc --- +## header_t +```rbs +Hash[String, String] +``` + ## httpreturn ```rbs { status: Integer, - headers: Hash[String, String], + headers: header_t, body: String } ```