instiki/app/models/author.rb
Jacques Distler 6cf1463525 Revert Revision 520; This is more thorough
This ensures that @page.name has the right (utf8)
encoding.
2010-01-04 18:43:27 -06:00

18 lines
No EOL
277 B
Ruby

class Author < String
attr_accessor :ip
attr_reader :name
def initialize(name, ip = nil)
@ip = ip
super(name.as_utf8)
end
def name=(value)
self.gsub!(/.+/, value)
end
alias_method :name, :to_s
def <=>(other)
name <=> other.to_s
end
end