Your SlideShare is downloading. ×
0
RUBY + RAILS
A really tiny introduction.	


FEU - East Asia College — 11 February 2014
こ	

ん	

に	

ち	

は	

ル	

ビ	

ー
LEARN
LEARN
by example :)
ハローワールド
Hello.java
public class Hello {!
public static void main(String[] args) {!
System.out.println(“Ohayou, Ruby!”);!
}...
ハローワールド
Hello.java
public class Hello {!
public static void main(String[] args) {!
System.out.println(“Ohayou, Ruby!”);!
}...
ハローワールド
Hello.java
public class Hello {!
public static void main(String[] args) {!
System.out.println(“Ohayou, Ruby!”);!
}...
ハローワールド
Hello.java

110

public class Hello {!
public static void main(String[] args) {!
System.out.println(“Ohayou, Ruby!...
578 %
Productivity Gain
578 %
Productivity Gain	

(I don’t really know what I’m doing.)
反復する
Loop.java
public class Loop {!
public static void main(String[] args) {!
! ! String fruits[] = new String[]{“apple”, ...
反復する
Loop.java
public class Loop {!
public static void main(String[] args) {!
! ! String fruits[] = new String[]{“apple”, ...
反復する
Loop.java
public class Loop {!
public static void main(String[] args) {!
! ! String fruits[] = new String[]{“apple”, ...
反復する
Loop.java
public class Loop {!
public static void main(String[] args) {!
! ! String fruits[] = new String[]{“apple”, ...
条件付きの
can_i_go_to_the_club.rb
if(age < 18)!
! puts “Minor!”;!
elsif(age >= 60)!
! puts “Senior”;!
elsif(age >= 18 && age <...
条件付きの
can_i_go_to_the_club.rb
if(age < 18)!
! puts “Minor!”!
elsif(age >= 60)!
! puts “Senior”!
elsif(age >= 18 && age < 6...
条件付きの
can_i_go_to_the_club.rb
if age < 18!
! puts “Minor!”!
elsif age >= 60!
! puts “Senior”!
elsif age >= 18 && age < 60!...
条件付きの
can_i_go_to_the_club.rb
if age < 18!
! puts “Minor!”!
elsif age >= 60!
! puts “Senior”!
elsif age >= 18 and age < 60...
コレクション
you_shall_not_pass.rb
passed = [] !
!

students.each do |student|!
! if score > 70!
! ! passed << student!
! end!
e...
コレクション
you_shall_not_pass.rb
passed = students.map { |s| s.score > 70 }!
passed = students.collect { |s| s.score > 70 }!
!...
RUBY ON RAILS
DEMO TIEM!
RESOURCES
•

https://www.ruby-lang.org/en/	


•

http://guides.rubyonrails.org/	


•

http://railscasts.com/	


•

http://...
SLIDES
http://slidesha.re/1cq6fkn
THANK YOU!
Ken-Lauren Daganio	

@kendaganio
Ruby on Rails Introduction | FEU-EAC, February 2014
Ruby on Rails Introduction | FEU-EAC, February 2014
Ruby on Rails Introduction | FEU-EAC, February 2014
Ruby on Rails Introduction | FEU-EAC, February 2014
Upcoming SlideShare
Loading in...5
×

Ruby on Rails Introduction | FEU-EAC, February 2014

458

Published on

Published in: Technology
1 Comment
1 Like
Statistics
Notes
No Downloads
Views
Total Views
458
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
1
Likes
1
Embeds 0
No embeds

No notes for slide

Transcript of "Ruby on Rails Introduction | FEU-EAC, February 2014"

  1. 1. RUBY + RAILS A really tiny introduction. FEU - East Asia College — 11 February 2014
  2. 2. こ ん に ち は ル ビ ー
  3. 3. LEARN
  4. 4. LEARN by example :)
  5. 5. ハローワールド Hello.java public class Hello {! public static void main(String[] args) {! System.out.println(“Ohayou, Ruby!”);! }! }
  6. 6. ハローワールド Hello.java public class Hello {! public static void main(String[] args) {! System.out.println(“Ohayou, Ruby!”);! }! } hello.rb puts “Ohayou Ruby!”
  7. 7. ハローワールド Hello.java public class Hello {! public static void main(String[] args) {! System.out.println(“Ohayou, Ruby!”);! }! } hello.rb puts “Ohayou Ruby!” 110
  8. 8. ハローワールド Hello.java 110 public class Hello {! public static void main(String[] args) {! System.out.println(“Ohayou, Ruby!”);! }! } hello.rb puts “Ohayou Ruby!” 19
  9. 9. 578 % Productivity Gain
  10. 10. 578 % Productivity Gain (I don’t really know what I’m doing.)
  11. 11. 反復する Loop.java public class Loop {! public static void main(String[] args) {! ! ! String fruits[] = new String[]{“apple”, “orange”}! for(int i = 0; i < fruits.length; i++){! ! ! ! System.out.println(fruit[i]);! ! ! }! }! }
  12. 12. 反復する Loop.java public class Loop {! public static void main(String[] args) {! ! ! String fruits[] = new String[]{“apple”, “orange”}! for(int i = 0; i < fruits.length; i++){! ! ! ! System.out.println(fruit[i]);! ! ! }! }! } loop.rb fruits = [“apple”, “orange”]! fruits.each do |fruit| ! ! puts fruit ! end
  13. 13. 反復する Loop.java public class Loop {! public static void main(String[] args) {! ! ! String fruits[] = new String[]{“apple”, “orange”}! for(int i = 0; i < fruits.length; i++){! ! ! ! System.out.println(fruit[i]);! ! ! }! }! } loop.rb [“apple”, “orange”].each do |fruit| ! ! puts fruit ! end
  14. 14. 反復する Loop.java public class Loop {! public static void main(String[] args) {! ! ! String fruits[] = new String[]{“apple”, “orange”}! for(int i = 0; i < fruits.length; i++){! ! ! ! System.out.println(fruit[i]);! ! ! }! }! } loop.rb [“apple”, “orange”].each { |fruit| puts fruit }
  15. 15. 条件付きの can_i_go_to_the_club.rb if(age < 18)! ! puts “Minor!”;! elsif(age >= 60)! ! puts “Senior”;! elsif(age >= 18 && age < 60)! ! puts “Legal Age”;
  16. 16. 条件付きの can_i_go_to_the_club.rb if(age < 18)! ! puts “Minor!”! elsif(age >= 60)! ! puts “Senior”! elsif(age >= 18 && age < 60)! ! puts “Legal Age”
  17. 17. 条件付きの can_i_go_to_the_club.rb if age < 18! ! puts “Minor!”! elsif age >= 60! ! puts “Senior”! elsif age >= 18 && age < 60! ! puts “Legal Age”
  18. 18. 条件付きの can_i_go_to_the_club.rb if age < 18! ! puts “Minor!”! elsif age >= 60! ! puts “Senior”! elsif age >= 18 and age < 60! ! puts “Legal Age”
  19. 19. コレクション you_shall_not_pass.rb passed = [] ! ! students.each do |student|! ! if score > 70! ! ! passed << student! ! end! end
  20. 20. コレクション you_shall_not_pass.rb passed = students.map { |s| s.score > 70 }! passed = students.collect { |s| s.score > 70 }! ! — OR — ! ! passed = students.delete_if { |s| s.score <= 70 }! passed = students.reject { |s| s.score <= 70 }
  21. 21. RUBY ON RAILS
  22. 22. DEMO TIEM!
  23. 23. RESOURCES • https://www.ruby-lang.org/en/ • http://guides.rubyonrails.org/ • http://railscasts.com/ • http://ruby.railstutorial.org/ruby-on-rails-tutorial-book • http://ruby.learncodethehardway.org/
  24. 24. SLIDES http://slidesha.re/1cq6fkn
  25. 25. THANK YOU! Ken-Lauren Daganio @kendaganio
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×