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
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
Search
hatsu
June 05, 2025
Programming
1
110
Prism.parseで 300本以上あるエンドポイントに 接続できる権限の一覧表を作ってみた
hatsu
June 05, 2025
Tweet
Share
More Decks by hatsu
See All by hatsu
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
190
introduction_scriptor_gem.pdf
hatsu38
1
120
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
17k
Just a Rails Patch Update
hatsu38
2
730
Dive into MaintenanceTasks
hatsu38
1
150
GitHub Actions is Fun
hatsu38
1
170
Other Decks in Programming
See All in Programming
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
2
640
SODA - FACT BOOK
sodainc
1
1.1k
AWS CDKの推しポイント 〜CloudFormationと比較してみた〜
akihisaikeda
3
290
CursorはMCPを使った方が良いぞ
taigakono
0
150
Blazing Fast UI Development with Compose Hot Reload (droidcon New York 2025)
zsmb
1
120
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
3
780
The Evolution of Enterprise Java with Jakarta EE 11 and Beyond
ivargrimstad
1
850
データの民主化を支える、透明性のあるデータ利活用への挑戦 2025-06-25 Database Engineering Meetup#7
y_ken
0
280
第9回 情シス転職ミートアップ 株式会社IVRy(アイブリー)の紹介
ivry_presentationmaterials
1
200
Using AI Tools Around Software Development
inouehi
0
1.2k
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
250
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
210
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Raft: Consensus for Rubyists
vanstee
140
7k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
How to train your dragon (web standard)
notwaldorf
92
6.1k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Optimizing for Happiness
mojombo
379
70k
Git: the NoSQL Database
bkeepers
PRO
430
65k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Done Done
chrislema
184
16k
Transcript
Prism.parseͰ 300ຊҎ্͋ΔΤϯυϙΠϯτʹ ଓͰ͖ΔݖݶͷҰཡදΛ࡞ͬͯΈͨ Omotesandorb #110 @hatsu_38 2025/06/05
ࣗݾհ • Rubyྺ 6 = ΤϯδχΞྺ • SHE Inc. •
React.js / TypeScript / GitHub Actions • Ruby͕Ұ൪͖
ٕज़ελοΫ • Backend: Ruby, Ruby on Rails, GraphQL, Sidekiq •
Frontend: React.js, TypeScript, Next.js • Database: MySQL 8.0 • CI: GitHub Actions • Infrastructure: Kubernetes
ཧը໘ͷ શͯͷΤϯυϙΠϯτʹ͍ͭͯ ͲͷݖݶͰୟ͚Δ͔ ग़ͯ͠΄͍͠
Γ͍ͨ͜ͱ - PermissionͱAPIͷҰཡΛ࡞Δ • ਖ਼نදݱͰΰχϣΰχϣͯ͠Ͱ͖ͦ͏͕ͩɺ"45ͰͬͯΈͨ
Γ͍ͨ͜ͱ - PermissionͱAPIͷҰཡΛ࡞Δ • ͜Μͳײ͡ͷ.BSLEPXOΛੜ͢Δ
Γ͍ͨ͜ͱ - PermissionͱAPIͷҰཡΛ࡞Δ • ͜Μͳײ͡ͷ.BSLEPXOΛੜ͢Δ 1. શ"1*ͷΫϥε໊Λऔಘ͢Δ 2. શ"1*ͷ1VCMJDͳΞΫγϣϯ໊Λऔಘ͢Δ 3.
શ"1*ͷCFGPSF@BDUJPOΛऔಘ͢Δ 4. શ෦Λ߹ମͤͯ͞ZNMΛ࡞Δ 5. yml͔ΒMarkdownΛ࡞Δ ͜͜ΛASTͰ࣮ݱ͢Δ
Prism.parseʹ͍ͭͯ - AST(நߏจ)ΛΈཱͯΔ
None
CallNodeΛൈਮ
IntegerNodeΛൈਮ
Node͍ͬͺ͍͋Δ https://docs.ruby-lang.org/en/3.4/table_of_contents.html#classes
Prism.parseͷ݁ՌΛ͍͡ΕControllerͷ Class໊ͷऔಘͰ͖Δ
NodeΛ؆୯ʹऔಘ͍ͨ͠ - Prism::Visitor visit_୳ࡧ͍ͨ͠Node໊_node
NodeΛ؆୯ʹऔಘ͍ͨ͠ - Prism::Visitor visit_୳ࡧ͍ͨ͠Node໊_node
Class໊Λ؆୯ʹऔಘ͍ͨ͠ - Controllerͷྫ visit_୳ࡧ͍ͨ͠Node໊_node
Class໊Λ؆୯ʹऔಘ͍ͨ͠ - ClassNodeऔಘ visit_୳ࡧ͍ͨ͠Node໊_node ClassNode ίϯτʔϥʔ໊औಘʂ
Class໊Λ؆୯ʹऔಘ͍ͨ͠ - Prism::Visitor visit_୳ࡧ͍ͨ͠Node໊_node
ࠓճͬͨ visit_**_node • visit_class_node -> Controllerͷ໊લऔಘ • visit_call_node -> before_actionͷऔಘprivateϝιου͔Ͳ͏͔ͷఆ
• visit_module_node -> ωετ͞Εͨ$POUSPMMFSͷ.PEVMF໊औಘ • visit_def_node -> Controllerʹఆٛ͞ΕͨAction໊औಘ • visit_keyword_hash_node -> before_actionͷonlyͷऔಘ
͓ΘΓʹ 1.ਖ਼نදݱͰ࣮ݱͰ͖͚ͨͲASTͰ৮ͬͯΈ·ͨ͠ 2.Prism.parseͨ͠ΒNodeखʹೖΔ͠ 3.Prism::VisitorΛ͑ཉ͍͠NodeखʹೖΔͷͰҙ֎ͱΞϦͳબࢶ