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

Ruby on Rails - CEUNSP

lucas renan
November 17, 2012

Ruby on Rails - CEUNSP

Apresentação sobre Ruby on Rails no 8º Encontro do GURU Sorocaba, realizado no CEUNSP em Salto-SP dia 17/nov/2012

lucas renan

November 17, 2012
Tweet

More Decks by lucas renan

Other Decks in Technology

Transcript

  1. str = "ruby" puts str.class # String int = 100

    puts int.class # Fixnum puts nil.class # NilClass
  2. # application.rb # Pick the frameworks you want: # require

    "active_record/railtie" require "action_controller/railtie" require "action_mailer/railtie" require "active_resource/railtie" require "sprockets/railtie" # require "rails/test_unit/railtie"
  3. describe Order do it "sums the prices of items" do

    order = Order.new order.add_entry(Item.new( :price => Money.new(1.11, :USD) )) order.add_entry(Item.new( :price => Money.new(2.22, :USD), :quantity => 2 )) order.total.should eq(Money.new(5.55, :USD)) end end