<分区>
Possible Duplicate:
Calling a Function From a String With the Function's Name in Ruby
我想做这样的事情:
def self.greater_than(col_str='events')
self."#{col_str}"_greater_than(30) # search logic scope method
end
我怎样才能让它正确调用?我猜语法可能类似于创建动态方法。