SlideShare a Scribd company logo
1 of 20
Download to read offline
Ruby勉強会@札幌 特別編
Ruby&Rails
入門講座
Ruby札幌
http://jp.rubyist.net/?RubySapporo
アジェンダ
-はじめに(5分)
-自己紹介(35分)
-irbを使ったRuby実習(20分)
-休憩(5分)
-Rails実習(110分)
-おわりに (5分)
自己紹介
Self-Introduction
irbを使ったRuby実習
Practice ruby by using irb
Ruby実習
1 + 1
Ruby実習
1 + 0.1 * 5
Ruby実習
a = 1
a.class
Ruby実習
b = 2
c = a + b
puts c
Ruby実習
ab = “aaa”+“bbb”
puts “#{ab}ccc”
Ruby実習
ary = %w|aaa bbb ccc|
ary.class
ary.inspect
Ruby実習
ary[0]
ary << “ddd”
ary.shift
puts ary
Ruby実習
ary.each do |element|
puts element
end
Ruby実習
hash = {“aaa” => “xxx”,
“bbb” => “yyy”}
hash.class
Ruby実習
a = true
a.class
a.inspect
Ruby実習
if a
puts “true”
else
puts “false”
end
Ruby実習
def foo(isNight, name)
if (isNight)
return “こんばんわ#{name}”
else
return “こんにちわ#{name}”
end
end
Ruby実習
puts foo(true, “しまだ”)
休憩
break time
Railsチュートリアル
Practice rails
ここからは
masuidriveさんの資料で

More Related Content

Viewers also liked

20100213 Where The Street Has No Name
20100213 Where The Street Has No Name20100213 Where The Street Has No Name
20100213 Where The Street Has No NameKoji SHIMADA
 
20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 Sapporo20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 SapporoKoji SHIMADA
 
Ruby&Rails入門講座-2
Ruby&Rails入門講座-2Ruby&Rails入門講座-2
Ruby&Rails入門講座-2Koji SHIMADA
 
Ruby Sapporo Night Vol.4
Ruby Sapporo Night Vol.4Ruby Sapporo Night Vol.4
Ruby Sapporo Night Vol.4Koji SHIMADA
 
Talking About Fluent Interface
Talking About Fluent InterfaceTalking About Fluent Interface
Talking About Fluent InterfaceKoji SHIMADA
 
Ruby Sapporo Night Vol3
Ruby Sapporo Night Vol3Ruby Sapporo Night Vol3
Ruby Sapporo Night Vol3Koji SHIMADA
 

Viewers also liked (6)

20100213 Where The Street Has No Name
20100213 Where The Street Has No Name20100213 Where The Street Has No Name
20100213 Where The Street Has No Name
 
20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 Sapporo20081220 Rubybonenkai2008 Sapporo
20081220 Rubybonenkai2008 Sapporo
 
Ruby&Rails入門講座-2
Ruby&Rails入門講座-2Ruby&Rails入門講座-2
Ruby&Rails入門講座-2
 
Ruby Sapporo Night Vol.4
Ruby Sapporo Night Vol.4Ruby Sapporo Night Vol.4
Ruby Sapporo Night Vol.4
 
Talking About Fluent Interface
Talking About Fluent InterfaceTalking About Fluent Interface
Talking About Fluent Interface
 
Ruby Sapporo Night Vol3
Ruby Sapporo Night Vol3Ruby Sapporo Night Vol3
Ruby Sapporo Night Vol3
 

More from Koji SHIMADA

Next Generation Web Application Architecture
Next Generation Web Application ArchitectureNext Generation Web Application Architecture
Next Generation Web Application ArchitectureKoji SHIMADA
 
20110614 hmcc-enishitech
20110614 hmcc-enishitech20110614 hmcc-enishitech
20110614 hmcc-enishitechKoji SHIMADA
 
20110718 you-must-unlearn-what-you-have-learned rivisited
20110718 you-must-unlearn-what-you-have-learned rivisited20110718 you-must-unlearn-what-you-have-learned rivisited
20110718 you-must-unlearn-what-you-have-learned rivisitedKoji SHIMADA
 
20110602 osc2011do-rubysapporo-public
20110602 osc2011do-rubysapporo-public20110602 osc2011do-rubysapporo-public
20110602 osc2011do-rubysapporo-publicKoji SHIMADA
 
20110129 organizational-reform -that-is-a-fairy-tail
20110129 organizational-reform -that-is-a-fairy-tail20110129 organizational-reform -that-is-a-fairy-tail
20110129 organizational-reform -that-is-a-fairy-tailKoji SHIMADA
 
20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learned20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learnedKoji SHIMADA
 
20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-RubyKoji SHIMADA
 
20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporo20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporoKoji SHIMADA
 
20100626-We-Think-We-Act
20100626-We-Think-We-Act20100626-We-Think-We-Act
20100626-We-Think-We-ActKoji SHIMADA
 
20100526 The Productive Programmer
20100526 The Productive Programmer20100526 The Productive Programmer
20100526 The Productive ProgrammerKoji SHIMADA
 
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your SystemKoji SHIMADA
 
20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean Code20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean CodeKoji SHIMADA
 
Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)Koji SHIMADA
 
RubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009doRubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009doKoji SHIMADA
 
20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with Ruby20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with RubyKoji SHIMADA
 
20081205 Object Club Reject Talks2008
20081205 Object Club Reject Talks200820081205 Object Club Reject Talks2008
20081205 Object Club Reject Talks2008Koji SHIMADA
 
20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaCon20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaConKoji SHIMADA
 
20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtml20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtmlKoji SHIMADA
 
20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRuby20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRubyKoji SHIMADA
 
20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi Freaks20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi FreaksKoji SHIMADA
 

More from Koji SHIMADA (20)

Next Generation Web Application Architecture
Next Generation Web Application ArchitectureNext Generation Web Application Architecture
Next Generation Web Application Architecture
 
20110614 hmcc-enishitech
20110614 hmcc-enishitech20110614 hmcc-enishitech
20110614 hmcc-enishitech
 
20110718 you-must-unlearn-what-you-have-learned rivisited
20110718 you-must-unlearn-what-you-have-learned rivisited20110718 you-must-unlearn-what-you-have-learned rivisited
20110718 you-must-unlearn-what-you-have-learned rivisited
 
20110602 osc2011do-rubysapporo-public
20110602 osc2011do-rubysapporo-public20110602 osc2011do-rubysapporo-public
20110602 osc2011do-rubysapporo-public
 
20110129 organizational-reform -that-is-a-fairy-tail
20110129 organizational-reform -that-is-a-fairy-tail20110129 organizational-reform -that-is-a-fairy-tail
20110129 organizational-reform -that-is-a-fairy-tail
 
20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learned20101204 you-must-unlearn-what-you-have-learned
20101204 you-must-unlearn-what-you-have-learned
 
20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby20101001-Introduction-to-Developer-Testing-With-Ruby
20101001-Introduction-to-Developer-Testing-With-Ruby
 
20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporo20100626-OSC2010do-RubySapporo
20100626-OSC2010do-RubySapporo
 
20100626-We-Think-We-Act
20100626-We-Think-We-Act20100626-We-Think-We-Act
20100626-We-Think-We-Act
 
20100526 The Productive Programmer
20100526 The Productive Programmer20100526 The Productive Programmer
20100526 The Productive Programmer
 
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
20100226 Jim Coplien Said You Should Foster Generative Scheme In Your System
 
20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean Code20091030 Uncle Bob Said You Should Be A Professional With Clean Code
20091030 Uncle Bob Said You Should Be A Professional With Clean Code
 
Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)Our Strategy To Survive In This Hard World(tochigirubykaigi02)
Our Strategy To Survive In This Hard World(tochigirubykaigi02)
 
RubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009doRubySapporoDigestAndMore-osc2009do
RubySapporoDigestAndMore-osc2009do
 
20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with Ruby20090124 Pleasantly Programming with Ruby
20090124 Pleasantly Programming with Ruby
 
20081205 Object Club Reject Talks2008
20081205 Object Club Reject Talks200820081205 Object Club Reject Talks2008
20081205 Object Club Reject Talks2008
 
20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaCon20081004-OSC2008Tokyo/Fall-MetaCon
20081004-OSC2008Tokyo/Fall-MetaCon
 
20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtml20080823-TransformingPlainTextToHtml
20080823-TransformingPlainTextToHtml
 
20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRuby20080730-WelcomeToLifeWithRuby
20080730-WelcomeToLifeWithRuby
 
20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi Freaks20080622 Reject Kaigi2008 Kaigi Freaks
20080622 Reject Kaigi2008 Kaigi Freaks
 

Recently uploaded

[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ       2024/04/12の勉強会で発表されたものです。新人研修のまとめ       2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。iPride Co., Ltd.
 
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000Shota Ito
 
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directoryosamut
 
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。iPride Co., Ltd.
 
UPWARD_share_company_information_20240415.pdf
UPWARD_share_company_information_20240415.pdfUPWARD_share_company_information_20240415.pdf
UPWARD_share_company_information_20240415.pdffurutsuka
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxIoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxAtomu Hidaka
 

Recently uploaded (9)

[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
新人研修のまとめ       2024/04/12の勉強会で発表されたものです。新人研修のまとめ       2024/04/12の勉強会で発表されたものです。
新人研修のまとめ 2024/04/12の勉強会で発表されたものです。
 
PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000PHP-Conference-Odawara-2024-04-000000000
PHP-Conference-Odawara-2024-04-000000000
 
20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory20240412_HCCJP での Windows Server 2025 Active Directory
20240412_HCCJP での Windows Server 2025 Active Directory
 
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
Amazon SES を勉強してみる その12024/04/12の勉強会で発表されたものです。
 
UPWARD_share_company_information_20240415.pdf
UPWARD_share_company_information_20240415.pdfUPWARD_share_company_information_20240415.pdf
UPWARD_share_company_information_20240415.pdf
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptxIoT in the era of generative AI, Thanks IoT ALGYAN.pptx
IoT in the era of generative AI, Thanks IoT ALGYAN.pptx