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

Seja Feliz com Ruby!

on

  • 196 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
196
Views on SlideShare
196
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! Seja Feliz com Ruby! Presentation Transcript

  • sejafelizcom ruby
  • lucas renan
  • nu
  • guru sorocaba
  • sad panda
  • yukihiro matsumoto
  • perl,smalltalk, eiffel,ada,lisp
  • rubypermiteque vocêsejafeliz
  • uhull,valeumatz:)
  • 5.times { puts "We love Ruby" }
  • puramente orientadaaobjetos
  • 1.class # => Fixnum
  • 1.class # => Fixnum "ruby".class # => String
  • 1.class # => Fixnum "ruby".class # => String 1.to_s.class # => String
  • rubypermiteque vocêescrevacódigo elegante
  • class Person end person = Person.new
  • class Person attr_accessor :name end person = Person.new person.name = "lucas"
  • class Person attr_accessor :name, :age end person = Person.new person.name = "lucas" person.age = 24 puts person.age # => 24
  • 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
  • activesupport
  • require "active_support/all" 1.day.ago # => 2013-08-09 00:00:00 -0300
  • require "active_support/all" 1.day.ago # => 2013-08-09 00:00:00 -0300 Date.today.beginning_of_month # => Thu, 01 Aug 2013
  • 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
  • metaprogramming
  • klass = Class.new do end Person = klass Person.name # => Person
  • klass = Class.new do end Person = klass Person.name # => Person person = Person.new
  • 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
  • instalação
  • atéquandovocê vaificartriste?
  • obrigado:)