foco em simplicidade e produtividade. Possui uma sintaxe elegante que é natural de ler e fácil de escrever. http:/ /ruby-lang.org/en Monday, October 15, 12
then move_north 4 when :east then move_east 5 when :south then move_south 6 when :west then move_west 7 else "Unknown direction" 8 end Monday, October 15, 12
then move_north 4 when :east then move_east 5 when :south then move_south 6 when :west then move_west 7 else "Unknown direction" 8 end Monday, October 15, 12
"You passed a lowercased Ruby" 4 when /\bRuby\b/ 5 "You passed a capitalized Ruby" 6 when /\bRUBY\b/ 7 "You passed an uppercased Ruby" 8 else 9 "WAT? NO RUBY?" 10 end Monday, October 15, 12
= name # variavel de instância 4 end 5 6 def introduce 7 puts "Hello my name is #{@name}" 8 end 9 end 1 p = Person.new('rafael') 2 p.introduce 3 >> Hello my name is rafael Monday, October 15, 12
3 @name = name 4 end 5 6 def name 7 @name 8 end 9 end 10 11 p = Person.new('rafael') 12 p.name = 'macedo' 13 puts p.name 14 >> macedo Monday, October 15, 12
that’s optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration http:/ /rubyonrails.org Monday, October 15, 12