Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- irb(main):001:0> class Welcome
- irb(main):002:1> def sostituto(nome = "a tutti")
- irb(main):003:2> nome = @nome
- irb(main):004:2> end
- irb(main):005:1> def buongiorno
- irb(main):006:2> puts "Buondì #{@nome}"
- irb(main):007:2> end
- irb(main):008:1> def buonanotte
- irb(main):009:2> puts "Arrivederci #{@nome}"
- irb(main):010:2> end
- irb(main):011:1> end
- => nil
- irb(main):012:0> p = Welcome.new("Claudio")
- ArgumentError: wrong number of arguments (1 for 0)
- from (irb):12:in `initialize'
- from (irb):12:in `new'
- from (irb):12
- from :0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement