lib/kbam.rb
#FIXME: change to class method
# sanatize field
change to class method
sanatize field
change to class method sanatize field
def field_sanatize(field)
		field = field.to_s.strip
		if field =~ /\A[\w\.]{2,64}\Z/
			field.sub!(/\./, "`.`")
			return "`#{field}`"
		else
			error("invalid field name")
		end
	end
def field_sanatize ( field ) field = field . to_s . strip if field =~ / \A [ \w \. ]{2,64} \Z / field . sub! ( / \. / , "`.`" ) return "`#{field}`" else error ( "invalid field name" ) end end
FIXME: change to class method
sanatize field
FIXME : change to class method sanatize field
#matches word character and between 2 and 64 character length
field