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
CW 31: Ruby - Filipe Giusti
Search
hackthursday
August 02, 2012
Programming
1
42
CW 31: Ruby - Filipe Giusti
hackthursday
August 02, 2012
Tweet
Share
More Decks by hackthursday
See All by hackthursday
CW 36: Joomla! for dummies - Jerônimo Medina Madruga
hackthursday
1
58
CW 35: Node.JS - Guilherme Quental
hackthursday
1
48
CW 34: Bus1.me - Rafael Silva
hackthursday
2
56
CW 33: Pathfinding - Vinicius Maciel
hackthursday
1
36
CW 26: Computação Gráfica - Lucas Texeira
hackthursday
1
51
CW 25: Object Calisthenics - Vinícius Krolow
hackthursday
1
100
Other Decks in Programming
See All in Programming
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
150
Hack Claude Code with Claude Code
choplin
6
2.4k
20250708_JAWS_opscdk
takuyay0ne
2
120
CDK引数設計道場100本ノック
badmintoncryer
1
360
What's new in AppKit on macOS 26
1024jp
0
140
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
790
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
580
新メンバーも今日から大活躍!SREが支えるスケールし続ける組織のオンボーディング
honmarkhunt
5
8.2k
VS Code Update for GitHub Copilot
74th
2
670
#kanrk08 / 公開版 PicoRubyとマイコンでの自作トレーニング計測装置を用いたワークアウトの理想と現実
bash0c7
1
900
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
980
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
500
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
35
6.7k
Optimising Largest Contentful Paint
csswizardry
37
3.3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Rails Girls Zürich Keynote
gr2m
95
14k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Navigating Team Friction
lara
187
15k
Raft: Consensus for Rubyists
vanstee
140
7k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Adopting Sorbet at Scale
ufuk
77
9.5k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
8
700
Transcript
Ruby Elegância e expressividade
Ruby • Tipo de linguagem • Interpretadores • Sintaxe •
Objetos & Mensagens • Features • Tools • Rack • Rails • Sinatra
Ruby - Interpretadores • MRI - Matz's Ruby Interpreter •
YARV - Yet Another Ruby VirtualMachine • Jruby - JVM • Rubinius – Ruby em Ruby • IronRuby - .NET • MacRuby – Objective C
Ruby – Tipo de linguagem • Tipagem Dinâmica • OO
• Fortemente tipada • Garbage collection
Ruby - Sintaxe • Constante • ::EscopoGlobal • variavel_local •
@variavel_de_objeto • @@variavel_de_class • 2 • 2.3 • “string #{interpolada}”
Ruby - Sintaxe • :symbol • [1, 2] • {
:ola => 'voce' } ou { ola: 'voce' } • raise HelpError unless world.is_safe? • drink while ! beer.nil? • for nerd in @dj_house; nerd.eat(meat); end • case; when; default; end • 3.times { puts 'Hurra!' }
Ruby - Sintaxe • 3.times do; puts 'Hurra!'; end •
1..10 • Imprimir ímpares de 1 a 20 em ordem inversa
Ruby – Objetos e Mensagens • (Quase) Tudo são objetos.
• (Quase) Todas as interações são feitas com troca de mensagens • 1 + 1 • 1.+(1) • 1.send('+', 1)
Ruby – Objetos e Mensagens
Ruby - features • Suporte a introspecção (respond_to) • Redefinição
de métodos • Classes abertas • method_missing • Sem overload de métodos • Herança múltipla com mixins • const_missing
Ruby - Tools • Gems • bundle • Webservers •
Thin • Passenger • Unicorn • JVM • RVM e rbenv
Ruby - Rack • Ruby Webserver Interface • API minimalista
para os frameworks web • config.ru
Ruby - Rails • MVC • Routing • Middleware •
Migrations • Helpers
Ruby - Sinatra • DSL para aplicações web • Views
• haml :index • Helpers • enable :sessions