Module: PHPRB::DefMethod

Defined in:
lib/web/phprb.rb

Class Method Summary collapse

Class Method Details

.def_erb_method(methodname, erb) ⇒ Object



470
471
472
473
474
475
476
477
478
# File 'lib/web/phprb.rb', line 470

def def_erb_method(methodname, erb)
  if erb.kind_of? String
	fname = erb
	File.open(fname) {|f| erb = PHPRB.new(f.read) }
	erb.def_method(self, methodname, fname)
  else
	erb.def_method(self, methodname)
  end
end