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
複雑なフォームに立ち向かう Next.js の技術選定
macchiitaka
2
180
Compose Multiplatform × AI で作る、次世代アプリ開発支援ツールの設計と実装
thagikura
0
170
チームのテスト力を鍛える
goyoki
3
700
為你自己學 Python - 冷知識篇
eddie
1
350
今から始めるClaude Code入門〜AIコーディングエージェントの歴史と導入〜
nokomoro3
0
210
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
CloudflareのChat Agent Starter Kitで簡単!AIチャットボット構築
syumai
2
500
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
2.4k
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
RDoc meets YARD
okuramasafumi
4
170
より安全で効率的な Go コードへ: Protocol Buffers Opaque API の導入
shwatanap
1
340
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
310
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
70
11k
Gamification - CAS2011
davidbonilla
81
5.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Straight Up "How To Draw Better" Workshop
denniskardys
236
140k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
30
9.7k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Language of Interfaces
destraynor
161
25k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Statistics for Hackers
jakevdp
799
220k
Designing for humans not robots
tammielis
253
25k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
53k
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