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
ItoJum
May 12, 2026
40
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
VRChat.rb_2_Rubyオブジェクトの世界.pdf
ItoJum
May 12, 2026
More Decks by ItoJum
See All by ItoJum
SmartHRを支える従業員データ基盤とそのインフラ_Innovative Crosstalk Jamboree Geeks '26
itojum
0
280
VRChat.rbの野望.pdf
itojum
0
9
なぜtree-sitter-rubyの日本語シンボルはシンタックスハイライトされないのか
itojum
0
79
Ractorを試してみるぞ!+メタバースにおける地域.rbをやっているぜ
itojum
0
48
新卒一年目のコミュニティ駆動ライフ_新卒N年目のLT交流会.pdf
itojum
0
110
VRChat.rb_4_Ractorで始める並列処理.pdf
itojum
0
16
Rubyistのカテゴリを聞きに来ました_roppongirb.pdf
itojum
0
14
VRChat.rb_3_UzumibiでRubyのDiscord_BotをCloudflareにデプロイしたい.pdf
itojum
0
20
RubyKaigi_2026参加レポート_VRChat.rb.pdf
itojum
0
14
Featured
See All Featured
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
200
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.2k
How GitHub (no longer) Works
holman
316
150k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
Between Models and Reality
mayunak
4
390
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.7k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
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はいろいろなものがオブジェクトで構成されている • クラスもオブジェクト、モジュールもオブジェクト • 言語仕様が簡単に可視化できちゃうので、 覗いてみるとたのしいよ