Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
What is Ruby?
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Stephen Benner
May 21, 2014
Programming
55
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
What is Ruby?
Ruby is simple
It can be described briefly
Perhaps in four slides
Stephen Benner
May 21, 2014
Other Decks in Programming
See All in Programming
ジョジョの世界をXRで再現する
mofurune
0
160
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
Workers Cache を知る
syumai
0
360
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
0
450
APNsからLive Activityを開始する話
yumnumm
0
170
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
270
パスワード再設定メールのURLについて知っておこう
uyuki234
0
160
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1.1k
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
270
ActionController meets Protocol Buffers
sorah
0
520
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
Featured
See All Featured
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
450
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Deep Space Network (abreviated)
tonyrice
0
370
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Into the Great Unknown - MozCon
thekraken
41
2.8k
Skip the Path - Find Your Career Trail
mkilby
1
260
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
Building Flexible Design Systems
yeseniaperezcruz
330
41k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Transcript
Ruby
Facets of Ruby • Object-‐Oriented to the core
– Everything is an object – Tight encapsula<on – Single Inheritance, but with mixin magic • Dynamic – Duck typing – Advanced metaprogramming
Elegant def quicksort(a) return a if a.length
<= 1 pivot = a.shift split = a.partition {|i| i < pivot} (quicksort(split[0]) << pivot << (quicksort(split[1]))).flatten end
Concise def fname_incr(fname) !File.exists?(fname) ?
fname : /([0-‐9]+)\./.match(fname) ? fname_incr(fname.sub(/([0-‐9]+)/) { |m| (m.to_i+1).to_s }) : fname_incr(fname.sub(/[^\.]*/) { |m| m+'1' }) end
Powerful def traverse_tree(addition = '', &proc) yield addition
+ "Q: #{self.value}" depth = $total_height -‐ self.height # add 1 to depth because the root node has a depth of 0 self.yes.traverse_tree("\n"+"\t"*(depth+1), &proc) self.no.traverse_tree("\n"+"\t"*(depth+1), &proc) end