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
m1sogi
April 13, 2016
Programming
120
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
ActiveSupport Core Extension extends your creativity.
m1sogi
April 13, 2016
More Decks by m1sogi
See All by m1sogi
Enjoy Electron Everyone!
misogi
0
79
Other Decks in Programming
See All in Programming
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
140
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.8k
言語を使う側から、作る側へ。 自作 Lisp で得た新たな気づき。
andpad
0
150
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
230
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
340
Built Our Own Background Agent at LayerX
layerx
PRO
9
4.9k
What's New in Android 2026
veronikapj
0
250
freee が目指す データ マネジメント戦略 AI-Ready 時代を支える 攻めのガバナンスとは
freee
PRO
0
270
Apache Hive: そしてCloud Native Lakehouseへ
okumin
1
210
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
200
Apache Hive: Toward a Cloud Native Lakehouse
okumin
0
180
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
670
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
170
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.8k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
650
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
390
Discover your Explorer Soul
emna__ayadi
2
1.2k
Designing for Performance
lara
611
70k
Ruling the World: When Life Gets Gamed
codingconduct
0
290
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
240
Claude Code のすすめ
schroneko
67
230k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
420
Building the Perfect Custom Keyboard
takai
2
830
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 ͷߟ͑ • ศརػೳʢΈͳ͞Μʣ
• ίʔυϦʔσΟϯάʹ