Seja Feliz com Ruby!
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Seja Feliz com Ruby!

on

  • 213 views

Palestra apresentada no 1º encontro ABCoDes no ITESCS - Instituto de Tecnologia de São Caetano do Sul.

Palestra apresentada no 1º encontro ABCoDes no ITESCS - Instituto de Tecnologia de São Caetano do Sul.

Statistics

Views

Total Views
213
Views on SlideShare
213
Embed Views
0

Actions

Likes
0
Downloads
0
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Seja Feliz com Ruby! Presentation Transcript

  • 1. sejafelizcom ruby
  • 2. lucas renan
  • 3. nu
  • 4. guru sorocaba
  • 5. sad panda
  • 6. yukihiro matsumoto
  • 7. perl,smalltalk, eiffel,ada,lisp
  • 8. rubypermiteque vocêsejafeliz
  • 9. uhull,valeumatz:)
  • 10. 5.times { puts "We love Ruby" }
  • 11. puramente orientadaaobjetos
  • 12. 1.class # => Fixnum
  • 13. 1.class # => Fixnum "ruby".class # => String
  • 14. 1.class # => Fixnum "ruby".class # => String 1.to_s.class # => String
  • 15. rubypermiteque vocêescrevacódigo elegante
  • 16. class Person end person = Person.new
  • 17. class Person attr_accessor :name end person = Person.new person.name = "lucas"
  • 18. class Person attr_accessor :name, :age end person = Person.new person.name = "lucas" person.age = 24 puts person.age # => 24
  • 19. class Person attr_accessor :name, :age def is_adult? @age > 18 end end person = Person.new person.name = "lucas" person.age = 24 puts person.is_adult? # => true
  • 20. activesupport
  • 21. require "active_support/all" 1.day.ago # => 2013-08-09 00:00:00 -0300
  • 22. require "active_support/all" 1.day.ago # => 2013-08-09 00:00:00 -0300 Date.today.beginning_of_month # => Thu, 01 Aug 2013
  • 23. require "active_support/all" 1.day.ago # => 2013-08-09 00:00:00 -0300 Date.today.beginning_of_month # => Thu, 01 Aug 2013 [1, 2, 3].sum # => 6
  • 24. metaprogramming
  • 25. klass = Class.new do end Person = klass Person.name # => Person
  • 26. klass = Class.new do end Person = klass Person.name # => Person person = Person.new
  • 27. klass = Class.new do ["say", "scream"].each do |method| define_method method do |message| "#{method}ing: #{message}" end end end Person = klass Person.name # => Person person = Person.new puts person.say "ruby" # => saying: ruby puts person.scream "ruby <3" # => screaming: ruby <3
  • 28. instalação
  • 29. atéquandovocê vaificartriste?
  • 30. obrigado:)