From: Clement Ow Date: 2008-07-09T18:22:47+09:00 Subject: class methods I have built my own ruby library where it contains my specific commands and methods that I need to perform certain actions and my main script. In my ruby library I have something like: class Test def toDDMMYYYY(sep) strftime("%d#{sep}%m#{sep}%Y") end end And in my main script I have something like: require 'PersonalRubyLib.rb' class MainLogic def show_date d = Date.today d.Test.toDDMMYYYY("-") end end But apparently it shows an error: undefined method `toDDMMYYYY' for # (NoMethodError) Did do wrongly in calling the class methods, maybe I am confused with the syntax of calling class methods? Much help is appreciated, thanks! -- Posted via http://www.ruby-forum.com/.