×閉じる
ドキュメント mruby/c

クラス・ライブラリ一覧

目次

mruby/c 3.1以降
  クラス・ライブラリ一覧
  スケジューラに関するクラス・ライブラリ一覧
  クラスツリー
mruby/c 2.1
  クラス・ライブラリ一覧
  例外クラス

mruby/c 3.1以降

対象となる組込みクラス・機能

class method v3.3  v3.2 v3.1
Object   loop
printf
sprintf
to_s
inspect
raise
block_given?
nil?
kind_of?
is_a?
attr_accessor
attr_reader
dup
class
<=>
!=
!
puts
print
p
FalseClass to_s
inspect
TrueClass to_s
inspect
Array all? -
any? -
collect!
collect
delete_if
each_with_index
each_index
each
find_index -
join
to_s
inspect
include?
minmax
max
map
map!
min
dup
unshift
shift
pop
push
reject
reject!
last
first
index
count
length
size
sort
sort!
empty?
delete_at
clear
<<
| -
& -
[]=
at
[]
+
Hash











each
to_s
inspect
values
to_h
merge!
merge
count
length
size
keys
key
has_value?
has_key?
empty?
delete
dup
clear
[]=
[]
String
































bytes -
clear
downcase - -
downcase! - -
each_char
each_byte
empty?
to_f
include?
end_with?
start_with?
tr!
tr
upcase - -
upcase! - -
intern
to_sym
strip!
strip
rjust -
ljust -
rstrip!
rstrip
lstrip!
lstrip
slice!
split
ord
inspect
index
getbyte
dup
chomp!
chomp
[]=
[]
<<
to_s
to_i
length
size
*
+
Integer
















times
to_s
upto -
downto -
clamp -
inspect
chr
to_f
to_i
abs
>>
<<
~
^
|
&
%
**
-@
+@
[]
Float
 
 
 
 
 
 
clamp -
to_s
inspect
to_f
to_i
abs
-@
+@
Range
 
 
 



each
to_s
inspect
exclude_end?
last
first
Symbol




to_sym
id2name
to_s
inspect
all_symbols
NilClass




to_s
inspect
to_f
to_h
to_a
to_i

 

スケジューラに関する組込みクラス・機能

class method v3.3  v3.2 v3.1
Object sleep
sleep_ms
Task create - -
current - -
get - -
join - -
list - -
name - -
name= - -
name_list - -
pass - -
priority - -
priority= - -
raise - -
resume - -
rewind - -
run - -
status - -
suspend - -
terminate - -
value - -
Mutex




lock
locked? - -
owned? - -
try_lock
unlock

 

クラスツリー

Object 全てのクラスのスーパークラス。オブジェクトの一般的な振舞いを定義します。
├ NilClass nil のクラス。nil は NilClass クラスの唯一のインスタンスです。nil は false オブジェクトとともに偽を表し、その他の全てのオブジェクトは真です。
├ TrueClass true のクラス。true は TrueClass クラスの唯一のインスタンスです。true は真を表す代表のオブジェクトです。
├ FalseClass falseのクラス。falseはFalseClassクラスの唯一のインスタンスです。falseはnilオブジェクトとともに偽を表し、その他の全てのオブジェクトは真です。
├ Integer 整数クラス。実装は C言語の32bit int が標準で、コンパイルオプション "MRBC_INT64" を定義することにより 64bit int になります。
├ Float 浮動小数点数のクラス。Float の実装は C 言語の double で、その精度は環境に依存します。
├ String 文字列クラス。ヌル文字を含む任意のバイト列を扱うことができます。最大長は標準で64kバイトです。文字エンコードについては、現在の実装では考慮していません。
├ Math 浮動小数点演算をサポートするモジュールです。
├ Proc ブロック(手続き)のためのクラスです。
├ Array 配列クラス。配列は任意の Ruby オブジェクトを要素として持つことができます。
├ Hash ハッシュクラス。ハッシュは任意の種類のオブジェクト(キー)から任意の種類のオブジェクト(値)への関連づけを行うことができます。
├ Range 範囲オブジェクトのクラス。範囲オブジェクトは文字どおり何らかの意味での範囲を表します。
└ Exception 全ての例外のスーパークラス。
    ├ NoMemoryError メモリの確保に失敗すると発生します。
    ├ NotImplementedError 現在のプラットフォームで実装されていない機能が呼び出されたときに発生します。
    └ StandardError 通常のプログラムで発生する可能性の高い例外クラスを束ねるためのクラスです。
        ├ RuntimeError 特定の例外クラスには該当しないエラーが起こったときに発生します。また raise で例外クラスを指定しなかった場合も RuntimeError が発生します。
        ├ ZeroDivisionError 整数に対して整数の 0 で除算を行ったときに発生します。
        ├ ArgumentError 引数の数が合っていないときや、数は合っていて、期待される振る舞いを持ってはいるが、期待される値ではないときに発生します。
        ├ IndexError 添字が範囲外のときに発生します。
        ├ TypeError メソッドの引数に期待される型ではないオブジェクトや、期待される振る舞いを持たないオブジェクトが渡された時に発生します。
        ├ RangeError 範囲に関する例外クラスです。値が定義域から外れているときに発生します。
        └ NameError 未定義のローカル変数や定数を使用したときに発生します。
            └ NoMethodError
定義されていないメソッドの呼び出しが行われたときに発生します。

 

mruby/c 2.1

対象となる組込みクラス・機能

class method
Object   sleep
sleep_ms
loop
printf
sprintf
to_s
inspect
raise
block_given?
nil?
kind_of?
is_a?
attr_accessor
attr_reader
dup
class
<=>
!=
!
puts
print
p
FalseClass to_s
inspect
TrueClass to_s
inspect
Array collect!
collect
each_with_index
each_index
each
join
to_s
inspect
minmax
max
min
dup
unshift
shift
pop
push
last
first
index
count
length
size
empty?
delete_at
clear
<<
[]=
at
[]
+
Hash











each
to_s
inspect
values
to_h
merge!
merge
count
length
size
keys
key
has_value?
has_key?
empty?
delete
dup
clear
[]=
[]
String
































each_char
each_byte
to_f
include?
end_with?
start_with?
tr!
tr
intern
to_sym
strip!
strip
rstrip!
rstrip
lstrip!
lstrip
split
ord
inspect
index
getbyte
dup
chomp!
chomp
[]=
[]
<<
to_s
to_i
length
size
*
+
Integer
















times
to_s
inspect
chr
to_f
to_i
abs
>>
<<
~
^
|
&
%
**
-@
+@
[]
Float
 
 
 
 
 
 
clamp
to_s
inspect
to_f
to_i
abs
-@
+@
Range
 
 
 



each
to_s
inspect
exclude_end?
last
first
Symbol




to_sym
id2name
to_s
inspect
all_symbols
NilClass




to_s
inspect
to_f
to_h
to_a
to_i

例外クラス

Exception 全ての例外の祖先のクラスです。
└ StandardError 通常のプログラムで発生する可能性の高い例外クラスを束ねるためのクラスです。
  ├ RuntimeError 特定の例外クラスには該当しないエラーが起こったときに発生します。また Kernel.#raise で例外クラスを指定しなかった場合も RuntimeError が発生します。
  ├ ZeroDivisionError 整数に対して整数の 0 で除算を行ったときに発生します。
  ├ ArgumentError 引数の数が合っていないときや、数は合っていて、期待される振る舞いを持ってはいるが、期待される値ではないときに発生します。
  ├ IndexError 添字が範囲外のときに発生します。
  └ TypeError メソッドの引数に期待される型ではないオブジェクトや、期待される振る舞いを持たないオブジェクトが渡された時に発生します。

 

 

 

このページのトップへ