2013年8月9日金曜日

[Why's] 4.Floating Little Leaves of Code

  • http://mislav.uniqpath.com/poignant-guide/book/chapter-4.html
  • 1. The Leaf as a Status Symbol in Ambrose
    • Animal Perfect L.L.C. is a firm, which build new animals and salvage old-style animals for parts.
    • Starmonkeys are one of such animals.
    • "A lot of Rubyists like to think of methods as a message."
    • A Ruby program consists of two parts:
      1. Defining things.
      2. Putting those things into action.
    • Assignment (=) is the simplest example of defining something in Ruby.
    • Starmonkey creation process looks in Ruby as follows:
      starmonkey = ratchet.attach( captive_monkey, pipe.catch_a_star ) + deco_hand_frog
      
  • 2. Small and Nearly Worthless
    • Nil: "In Ruby, nil represents an emptiness."
    • False: "Generally speaking, everything in Ruby has a positive charge to it. This spark flows through strings, numbers, regexps, all of it. Only two keywords wear a shady cloak: nil and false draggin’ us down."
    • True: "To be honest, I can’t be around someone who always has to be right. This true is always saying, 'A-OK.'"
  • 3. Chaining Delusions Together
    • TBW
  • 4. The Miracle of Blocks
    • TBW

0 件のコメント: