Hi,

Could someone explain how i get this to work please:

module Keith
  def self.greeting
    @greeting ||= "hello"
  end
  def self.greeting=(value)
    puts "updating knowledge"
    @greeting = value
  end
  def self.speak
    puts greeting
  end
  def self.learn_ruby
    self.greeting = "ruby"
  end
  def self.learn_french
    learn_language(greeting, "bonjour")
  end
  def self.learn_language(prop, value)
    puts prop.inspect
    prop = value
    puts prop.inspect
    #p =
    value
  end
end

Keith.speak
Keith.learn_ruby
Keith.learn_french
Keith.speak



This outputs:

hello
updating knowledge
"ruby"
"bonjour"
ruby


I can't for the life of me get it to work...


many thanks
keith
-- 
Posted via http://www.ruby-forum.com/.