Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
VRChat.rb_2_Rubyオブジェクトの世界.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ItoJum
May 12, 2026
7
0
Share
VRChat.rb_2_Rubyオブジェクトの世界.pdf
ItoJum
May 12, 2026
More Decks by ItoJum
See All by ItoJum
RubyKaigi_2026参加レポート_VRChat.rb.pdf
itojum
0
6
メタバースで地域.rbやってみた!
itojum
2
340
VRChat.rb #0 - RubyKaigi 2026 スケジュールを見る会
itojum
0
15
フレッシュITあわ〜ど 最終審査会スライド_いとじゅん
itojum
0
22
デプロイ講座_福プロ.pdf
itojum
0
27
connpass AIボットを作りたかった話
itojum
0
54
Orvalでconnpass MCPサーバーを自動生成してみた
itojum
0
21
Orvalでconnpass MCPサーバーを自動生成してみた
itojum
0
87
エンジニアの文書記法の大定番!Markdown記法
itojum
0
40
Featured
See All Featured
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
370
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
AI: The stuff that nobody shows you
jnunemaker
PRO
7
640
Game over? The fight for quality and originality in the time of robots
wayneb77
1
170
How to build a perfect <img>
jonoalderson
1
5.5k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
280
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Building Applications with DynamoDB
mza
96
7k
How to train your dragon (web standard)
notwaldorf
97
6.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.3k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Context Engineering - Making Every Token Count
addyosmani
9
890
Transcript
None
Ruby オブジェクトの世界 VRChat.rb #2 いとじゅん
オブジェクトとインスタンスについて オブジェクト = Ruby で扱える全ての値 インスタンス = クラスに対するオブジェクトのこと 本発表では、インスタンス ==
オブジェクトみたい にしゃべります
Rubyのオブジェクトな ものを見ていこう
値 p 168.class # => Integer p "yachi".class # =>
String p true.class # => TrueClass p false.class # => FalseClass p nil.class # => NilClass
値 p 168.class # => Integer p "yachi".class # =>
String p true.class # => TrueClass p false.class # => FalseClass p nil.class # => NilClass みんなクラスのインスタン スファミリー
クラス p Integer.class # => Class p String.class # =>
Class p TrueClass.class # => Class p FalseClass.class # => Class p NilClass.class # => Class
クラス p Integer.class # => Class p String.class # =>
Class p TrueClass.class # => Class p FalseClass.class # => Class p NilClass.class # => Class p Class.class # => Class クラスもClassの インスタンス
演算子 p "超".method("+") # => #<Method: String#+(_)> p "か".method("*") #
=> #<Method: String#*(_)> p "や".method("==") # => #<Method: String#==(_)> p "ぐ".method("!=") # => #<Method: String(BasicObject)#!=(_)> p "姫".method("<") # => #<Method: String(Comparable)#<(_)> p "!".method("&&") # => NameError
演算子 p "超".method("+") # => #<Method: String#+(_)> p "か".method("*") #
=> #<Method: String#*(_)> p "や".method("==") # => #<Method: String#==(_)> p "ぐ".method("!=") # => #<Method: String(BasicObject)#!=(_)> p "姫".method("<") # => #<Method: String(Comparable)#<(_)> p "!".method("&&") # => NameError これはオブジェク トじゃない
継承チェーン クラスやモジュールの継承の連なり p "cpk".class.ancestors # => [String, Comparable, Object, Kernel,
BasicObject] じゃあ、この出てきたやつらはオブジェクト?
継承チェーン p String.class # => Class p Comparable.class # =>
Module p Object.class # => Class p Kernel.class # => Module p BasicObject.class # => Class
継承チェーン p String.class # => Class p Comparable.class # =>
Module p Object.class # => Class p Kernel.class # => Module p BasicObject.class # => Class Classクラスと Moduleクラスのイ ンスタンスファミ リー
おわりに • Rubyはいろいろなものがオブジェクトで構成されている • クラスもオブジェクト、モジュールもオブジェクト • 言語仕様が簡単に可視化できちゃうので、 覗いてみるとたのしいよ