Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #3297
| From | Siratinee Sukachai <ploy.sukachai@gmail.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | error: undefined method |
| Date | 2011-04-21 02:55 -0500 |
| Organization | Service de news de lacave.net |
| Message-ID | <0bfc818aaade1cf1852b483c69c7074b@ruby-forum.com> (permalink) |
I create a method named splitDot which is spliting a dot "."
Inside a class, I call that method but I got the error.
This is the full error:
app/controllers/convert_to_yaml.rb:14: undefined method `splitDot' for
ConvertToYaml:Class (NoMethodError)
from app/controllers/convert_to_yaml.rb:13:in `each'
from app/controllers/convert_to_yaml.rb:13
My method:
private
def splitDot(s)
return s.split('.')
end
And I call the method like this:
text.each{|t|
array = splitDot(t)
}
Any suggestions?
--
Posted via http://www.ruby-forum.com/.
Back to comp.lang.ruby | Previous | Next — Next in thread | Find similar | Unroll thread
error: undefined method Siratinee Sukachai <ploy.sukachai@gmail.com> - 2011-04-21 02:55 -0500
Re: error: undefined method Brian Candler <b.candler@pobox.com> - 2011-04-21 04:20 -0500
Re: error: undefined method Siratinee Sukachai <ploy.sukachai@gmail.com> - 2011-04-21 04:34 -0500
Re: error: undefined method Gunther Diemant <g.diemant@gmx.net> - 2011-04-21 06:59 -0500
csiph-web