------------1171C3E01BE78E1C
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit

I'm still not "getting it."

Consider

- - - 
class DirectoryString < String
  def initialize(arg)
    super arg
  end
  
  def convert_forward_slash_to_back_slash
    self.gsub(/\//, "\\")
  end

  def convert_forward_slash_to_back_slash!
    self.gsub!(/\//, "\\")
  end

  def remove_trailing_backslash_if_any
    self.chomp("\\")
  end

  def remove_trailing_backslash_if_any!
    self.chomp!("\\")
  end

  def append_trailing_backslash_if_needed
    remove_trailing_backslash_if_any + "\\"
  end

  def append_trailing_backslash_if_needed!
    # ??????? What do I do here ??????? ... The following is illegal
    self  Help!"
  end
end

- - -


The only thing I can think of is converting from the standard IS_A (Inheritance) to a HAS_A (create a member variable).

If I do the latter, above, I will have to create a ton of simple "forwarding" messages.

What's the Ruby way of doing this sort of thing?
------------1171C3E01BE78E1C--