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
0
100
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
73
Other Decks in Programming
See All in Programming
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
4
520
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
6
1.1k
[SRE NEXT] 複雑なシステムにおけるUser Journey SLOの導入
yakenji
1
900
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
150
書き捨てではなく継続開発可能なコードをAIコーディングエージェントで書くために意識していること
shuyakinjo
0
180
階層化自動テストで開発に機動力を
ickx
1
470
Strands Agents で実現する名刺解析アーキテクチャ
omiya0555
1
110
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
420
MCPで実現できる、Webサービス利用体験について
syumai
7
2.3k
バイブスあるコーディングで ~PHP~ 便利ツールをつくるプラクティス
uzulla
1
320
React は次の10年を生き残れるか:3つのトレンドから考える
oukayuka
41
16k
プロダクトという一杯を作る - プロダクトチームが味の責任を持つまでの煮込み奮闘記
hiliteeternal
0
370
Featured
See All Featured
The Cult of Friendly URLs
andyhume
79
6.5k
Building an army of robots
kneath
306
45k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Fireside Chat
paigeccino
37
3.6k
Unsuck your backbone
ammeep
671
58k
Why Our Code Smells
bkeepers
PRO
337
57k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
[RailsConf 2023] Rails as a piece of cake
palkan
56
5.7k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
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 ͷߟ͑ • ศརػೳʢΈͳ͞Μʣ
• ίʔυϦʔσΟϯάʹ