From: Brian Candler Date: 2009-06-03T02:15:31+09:00 Subject: Re: nfc 1.0.0 Released Suraj Kurapati wrote: > You could simplify your public API (by not requiring users to type > .instance) like this: > > require 'singleton' > NFC = Class.new do > include Singleton > # ... > end.instance Module functions are good for this too. module NFC def find(*args) puts *args end module_function :find end NFC.find("123") class Foo include NFC def bar find("456") end end Foo.new.bar -- Posted via http://www.ruby-forum.com/.