003 Ruby小觀念與小技巧Part2

download 003 Ruby小觀念與小技巧Part2

of 29

  • date post

    29-Aug-2014
  • Category

    Technology

  • view

    1.041
  • download

    9

Embed Size (px)

description

require, load, include的不同 yield語法 method的選擇性參數、不定數量參數與順序

Transcript of 003 Ruby小觀念與小技巧Part2

  • 30 Ruby& Part 2 By Bruce Li 2012/04/19 12421
  • require, load, include yield method12421
  • require, load, include12421
  • require vs. load12421
  • require vs. load 12421
  • require vs. load 12421
  • require vs. load loa d 12421
  • require vs. load loa d 12421
  • require/load requireload loadrequire 12421
  • /Users/bruce/Desktop/../var.rb = /Users/bruce/var.rb /Users/bruce/Desktop/var.rb12421
  • 12421
  • require vs. include moduleclassinclude require12421
  • 12421
  • include libmodule (rails) rails 2include rails 3 includerequire require "authenticated_system" => require RailsRoot/lib/authenticated_system.rb12421
  • module 12421
  • yield12421
  • => 1.201159000396728512421
  • yield12421
  • yield 2 4 612421
  • yield 2 4 612421
  • method12421
  • /12421
  • 12421
  • 12421
  • hash12421
  • 12421
  • - hash { }hash { }12421
  • end12421
  • Rails/iOS/Android inside job board & http://littlebmix.blogspot.com/ http://ascend-er.blogspot.com/12421