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 creativity.
Search
m1sogi
April 13, 2016
Programming
0
84
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
70
Other Decks in Programming
See All in Programming
dbtのドメイン分割による データ基盤の改善とDigdagとの連携
sakama
0
150
Git Rebase
bkuhlmann
11
1.6k
PostmanでAPIの動作確認が楽になった話
h455h1
0
170
StoreKit2によるiOSのアプリ内課金のリニューアル
kangnux
0
110
入門 AWS Amplify Gen2 / Introduction to AWS Amplify Gen2
genkiogasawara
1
330
Prepare for Jakarta EE 11 - Performance and Developer Productivity
ivargrimstad
0
740
AWS Application Composerで始める、 サーバーレスなデータ基盤構築 / 20240406-jawsug-hokuriku-shinkansen
kasacchiful
1
260
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
120
見た目から始める生産性向上
ikumatadokoro
7
830
Rethinking UI building strategies @ SFI 2024
letelete
0
270
Elm Form Validation
bkuhlmann
0
510
Ruby GitHub Packages
bkuhlmann
0
630
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
2
1.3k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
18
6.9k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
226
51k
From Idea to $5000 a Month in 5 Months
shpigford
377
45k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
The Invisible Side of Design
smashingmag
294
49k
Practical Orchestrator
shlominoach
182
9.7k
Making Projects Easy
brettharned
108
5.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
260
12k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
What's in a price? How to price your products and services
michaelherold
237
11k
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 ͷߟ͑ • ศརػೳʢΈͳ͞Μʣ
• ίʔυϦʔσΟϯάʹ