class StringFactory def StringFactory.method_missing(m, *args) return String.new(m.to_s, *args) endendputs StringFactory.a_string # => "a_string"puts StringFactory.another_string # => "another_string"