Hi
I have my initialise constructor, why won't my function to_hash work ?
def initialize(msg)
@original_msg = msg.strip.delete(' ')
s = ["|","^"]
@chunked_msg = @original_msg.split(s[0])
@msg_hash.self.to_hash
end
def to_hash
@chunked_msg.each do |x|
s = x.split("=")
@msg_hash[s[0]] = s[1]
end
return @msg_hash
end