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
ActiveSupport Core Extension extends your creat...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
m1sogi
April 13, 2016
Programming
0
110
ActiveSupport Core Extension extends your creativity.
m1sogi
April 13, 2016
Tweet
Share
More Decks by m1sogi
See All by m1sogi
Enjoy Electron Everyone!
misogi
0
74
Other Decks in Programming
See All in Programming
Grafana:建立系統全知視角的捷徑
blueswen
0
330
AIによる開発の民主化を支える コンテキスト管理のこれまでとこれから
mulyu
3
300
React 19でつくる「気持ちいいUI」- 楽観的UIのすすめ
himorishige
11
7.4k
CSC307 Lecture 08
javiergs
PRO
0
670
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
180
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
AI時代の認知負荷との向き合い方
optfit
0
160
組織で育むオブザーバビリティ
ryota_hnk
0
180
CSC307 Lecture 09
javiergs
PRO
1
840
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
Architectural Extensions
denyspoltorak
0
290
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.9k
Exploring anti-patterns in Rails
aemeredith
2
250
Unsuck your backbone
ammeep
671
58k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.2k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.6k
From π to Pie charts
rasagy
0
120
Un-Boring Meetings
codingconduct
0
200
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Transcript
ActiveSupport Core Extension extends your creativity. @m1sogi
@m1sogi Slack ͓͡͞Μ Ruby/PHP programmer C#, ڝϓϩ, Haskell, TypeScript
vscode rubocop plugin https://github.com/misogi/vscode-ruby-rubocop
Where is cool ruby code?
• Principle of Lease Surprise (࠷ۙͦ͏Ͱͳ͍) • ଟ༷ੑ
Ruby ActiveRecord ActionPack ActionView ActiveJob ActiveSupport My program! other gems
-ive support • Core extension • Autoload, Concern, Gzip, JSON,
Logger, ProxyObject, …..
gem install activesupport irb -r active_support > require ‘active_support/core_ext’ >
’’.blank? => true Install
[1,2,3].inject(0) {|a, i| a + i} [1,2,3].inject(0, :+)
> [1,2,3].sum => 6 Open class!
arr.prepend(4) arr.unshift(4) == arr << 4 arr.push(4) == arr.append(4) “name”.starts_with?(‘s’)
“name”.ends_with?(‘s’) “name”.start_with?(‘s’) “name”.end_with?(‘s’) == ==
arr.second arr[1] == arr[2] == arr.third arr.forty_two == arr[41] Equal
to self[41]. Also known as accessing "the reddit". arr[-2] arr.second_to_last ==
Object#deep_dup
String
Class#class_attribute Meta programming! DPPLQBEίʔσΟϯάඪ४
ActiveSupport -> Ruby ‘xml’.try!(:upcase) ‘xml’&.upcase s = <<DOC.strip_heredoc ग़ੈͷ֗ ͦΕদ
DOC s = <<~DOC ग़ੈͷ֗ ͦΕদ DOC
For code reading
Conclusion • active_support ͷ Ґஔ͚ͮͱ Rails ͷߟ͑ • ศརػೳʢΈͳ͞Μʣ
• ίʔυϦʔσΟϯάʹ