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
130
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
230
introduction_scriptor_gem.pdf
hatsu38
1
130
約9000個の自動テストの 時間を50分->10分に短縮 Flakyテストを1%以下に抑えた話
hatsu38
24
17k
Just a Rails Patch Update
hatsu38
2
770
Dive into MaintenanceTasks
hatsu38
1
160
GitHub Actions is Fun
hatsu38
1
170
Other Decks in Programming
See All in Programming
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
320
Gemini CLIの"強み"を知る! Gemini CLIとClaude Codeを比較してみた!
kotahisafuru
3
920
Claude Code で Astro blog を Pages から Workers へ移行してみた
codehex
0
170
変化を楽しむエンジニアリング ~ いままでとこれから ~
murajun1978
0
660
商品比較サービス「マイベスト」における パーソナライズレコメンドの第一歩
ucchiii43
0
270
What's new in Adaptive Android development
fornewid
0
130
AI Ramen Fight
yusukebe
0
120
DataformでPythonする / dataform-de-python
snhryt
0
150
新しいモバイルアプリ勉強会(仮)について
uetyo
1
250
SwiftでMCPサーバーを作ろう!
giginet
PRO
2
220
MCP連携で加速するAI駆動開発/mcp integration accelerates ai-driven-development
bpstudy
0
250
PHPUnitの限界をPlaywrightで補完するテストアプローチ
yuzneri
0
380
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.5k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1k
Practical Orchestrator
shlominoach
190
11k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.6k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Fireside Chat
paigeccino
38
3.6k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
182
54k
Scaling GitHub
holman
461
140k
Building an army of robots
kneath
306
45k
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खʹೖΔͷͰҙ֎ͱΞϦͳબࢶ