Ruby Method Name with Spaces

by woody2shoes on May 27, 2010


This is an introduction to Ruby metaprogramming where I cover two different ways to define a method. The idea actually started as a joke, but there are valuable lessons to be learned here.
Download 11.2 MB
Download (iphone & ipod) 4.9 MB

  • http://www.techwatch.co.uk/ Techwatch

    great little video thanks

  • Anonymous

    Nice video. You overcomplicated last example:
    class Joon
    class<<self
    define_method("say hello") do
    puts "hello from class"
    end
    end
    end

    Joon.send("say hello")

    http://pastie.org/980560

    • http://twitter.com/rubyhead Joon You

      Yup, you’re right, but I really wanted to flaunt the class_eval…;)

  • http://www.techwatch.co.uk/ Techwatch

    great little video thanks

  • radarek

    Nice video. You overcomplicated last example:
    class Joon
    class<<self
    define_method(“say hello”) do
    puts “hello from class”
    end
    end
    end

    Joon.send(“say hello”)

    http://pastie.org/980560

  • http://twitter.com/rubyhead Joon You

    Yup, you're right, but I really wanted to flaunt the class_eval…;)

  • guest

    Download doesnt work (same for all screencasts). “Domain name expired on 05/28/2010″…
    Are you planning to do something about it?

    • http://teachmetocode.com Charles Max Wood

      I got it fixed yesterday. Sorry about that.

  • guest

    Download doesnt work (same for all screencasts). “Domain name expired on 05/28/2010″…
    Are you planning to do something about it?

  • woody2shoes

    I got it fixed yesterday. Sorry about that.

  • Don

    I just found your wonderful podcast and I am attempting to download a number of previous episodes to my zune. There are a number of episodes that do not download with the following error message:
    DOWNLOAD ERROR

    Summary
    Zune doesn’t support the file type or doesn’t support the codec that was used to create the file.

    Error Code
    C00D119

    The episodes that resulted with this error message include:
    Ruby Method Name with Spaces
    Easy Rails Jukebox Application
    Bash Command Line Editing
    Introduction to MongoDB – Part 1 for both 11/30/2009 and 11/22/2009
    Creating a Twitter Clone in Rails
    Styleize your Rails app with Themes
    Easy Rails Runner Application

    I am attempting to downloads with the Zune software on my laptop not on the zune itself yet I am still generating this error.

    • http://teachmetocode.com Charles Max Wood

      Let me look at that. I just set up a Windows machine so I can play with Zune stuff. Can you send an email to chuck@teachmetocode.com so I can follow up when I think I have them fixed?

  • Don

    I just found your wonderful podcast and I am attempting to download a number of previous episodes to my zune. There are a number of episodes that do not download with the following error message:
    DOWNLOAD ERROR

    Summary
    Zune doesn't support the file type or doesn't support the codec that was used to create the file.

    Error Code
    C00D119

    The episodes that resulted with this error message include:
    Ruby Method Name with Spaces
    Easy Rails Jukebox Application
    Bash Command Line Editing
    Introduction to MongoDB – Part 1 for both 11/30/2009 and 11/22/2009
    Creating a Twitter Clone in Rails
    Styleize your Rails app with Themes
    Easy Rails Runner Application

    I am attempting to downloads with the Zune software on my laptop not on the zune itself yet I am still generating this error.

  • Anonymous

    Let me look at that. I just set up a Windows machine so I can play with Zune stuff. Can you send an email to chuck@teachmetocode.com so I can follow up when I think I have them fixed?

Previous post:

Next post: