Ruby by Example

Ruby by Example

James Hughes

June 22, 2012

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

42 slides
  1. if rating >= 4 puts "great" elsif rating == 3

    puts "alright" else puts "sucks" end
  2. class Person attr_accessor :name attr_accessor :age ... end p =

    Person.new("James", 32) puts p.name, p.age
  3. class Person ... end class Hero < Person attr_accessor :powers

    end p = Hero.new("James", 32) p.powers = [“Flying”]

More Decks by James Hughes

Other Decks in Programming