Module: CustomERB::DefMethod

Defined in:
lib/ontomde-core/customERB.rb

Overview

:nodoc:

Class Method Summary collapse

Class Method Details

.def_erb_method(methodname, erb) ⇒ Object



830
831
832
833
834
835
836
837
838
# File 'lib/ontomde-core/customERB.rb', line 830

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