Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby by Example

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Ruby by Example

Avatar for James Hughes

James Hughes

June 22, 2012
Tweet

More Decks by James Hughes

Other Decks in Programming

Transcript

  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”]