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
38
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
なぜtree-sitter-rubyの日本語シンボルはシンタックスハイライトされないのか
itojum
0
72
Ractorを試してみるぞ!+メタバースにおける地域.rbをやっているぜ
itojum
0
45
新卒一年目のコミュニティ駆動ライフ_新卒N年目のLT交流会.pdf
itojum
0
110
VRChat.rb_4_Ractorで始める並列処理.pdf
itojum
0
16
Rubyistのカテゴリを聞きに来ました_roppongirb.pdf
itojum
0
11
VRChat.rb_3_UzumibiでRubyのDiscord_BotをCloudflareにデプロイしたい.pdf
itojum
0
19
RubyKaigi_2026参加レポート_VRChat.rb.pdf
itojum
0
12
メタバースで地域.rbやってみた!
itojum
2
380
VRChat.rb #0 - RubyKaigi 2026 スケジュールを見る会
itojum
0
22
Featured
See All Featured
Context Engineering - Making Every Token Count
addyosmani
9
1k
Claude Code のすすめ
schroneko
67
230k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
470
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1k
So, you think you're a good person
axbom
PRO
2
2.1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Accessibility Awareness
sabderemane
1
160
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
380
The Limits of Empathy - UXLibs8
cassininazir
1
530
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
320
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はいろいろなものがオブジェクトで構成されている • クラスもオブジェクト、モジュールもオブジェクト • 言語仕様が簡単に可視化できちゃうので、 覗いてみるとたのしいよ