Rubyで踏み出そう、次の一歩/The next step with Ruby
Upcoming SlideShare
Loading in...5
×
 

Rubyで踏み出そう、次の一歩/The next step with Ruby

on

  • 2,175 views

初心者向けにRubyについて紹介しています。

初心者向けにRubyについて紹介しています。
(ターゲットの絞り込みが甘いため、内容的にブレがあります)

Statistics

Views

Total Views
2,175
Views on SlideShare
2,139
Embed Views
36

Actions

Likes
3
Downloads
13
Comments
0

2 Embeds 36

http://www.nu-chon.org 35
http://s.deeeki.com 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • &#x30D7;&#x30ED;&#x30B0;&#x30E9;&#x30DE;&#x306E;&#x4EBA;&#x3001; &#x30C7;&#x30B6;&#x30A4;&#x30CA;&#x306E;&#x4EBA;? &#x3001;Ruby&#x3092;&#x4F7F;&#x3063;&#x305F;&#x3053;&#x3068;&#x304C;&#x3042;&#x308B;&#x4EBA;&#x3001;Ruby&#x3092;&#x4F7F;&#x3063;&#x3066;&#x4ED5;&#x4E8B;&#x3092;&#x3057;&#x3066;&#x3044;&#x308B;&#x4EBA; <br /> <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Rubyで踏み出そう、次の一歩/The next step with Ruby Rubyで踏み出そう、次の一歩/The next step with Ruby Presentation Transcript

  • Kazuya NUMATA for OSC-Do 2010 / Jun 26 2010
  • • ( Kazuya NUMATA) • • LOCAL • 4 CA • • • • twitter: @kaznum • Ruby 10 ?
  • Ruby
  • open(“/home/kaz/hogehoge.txt”) do |f| f.each do |line| print line end end #
  • [5, 6, 2, 26, 4].sort => [2, 4, 5, 6, 26] ( ) [5, 6, 2, 3, 5, 2].uniq => [5, 6, 2, 3] [5, 6, 2, 3, 5, 2].uniq.sort => [2, 3, 5, 6]
  • 3.times { print “hello” } 3 => “hellohellohello”
  • [2, 5, 1, 3, 9].map { |i| i * 3 } => [6, 15, 3, 9, 27]
  • Ruby on Rails ActiveRecord RubyGems ActiveSupport .... $ sudo gem install <gem >
  • 25.minutes.ago == Time.now - 25 * 60 Time.days_in_month(11) == 30
  • Java(Struts + Spring) ... public ActionForward edit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { PersonForm personForm = (PersonForm) form; if (personForm.getId() != null) { PersonManager mgr = (PersonManager) getBean("personManager"); Person person = mgr.getPerson(personForm.getId()); personForm = (PersonForm) convert(person); updateFormBean(mapping, request, personForm); } return mapping.findForward("edit"); } http://www.relevancellc.com/blog/2007/05/12/static-typing-and-readable-code.html
  • But on “Ruby on Rails”, def edit @person = Person.find(params[:id]) end http://www.relevancellc.com/blog/2007/05/12/static-typing-and-readable-code.html
  • ↓ ↓
  • Matz Ruby (C Ruby) jRuby (Java Ruby) IronRuby (.NET Ruby) RubyCocoa/Mac Ruby (Mac) Rubinius (Ruby Ruby) ...
  • ( )
  • Test::Unit / rspec / cucumber autotest
  • ( )
  • Thank you :)