class Symbol
def to_proc
Proc.new do |obj, *args|
obj.send self, *args
end
end
end
ex)
:reverse.to_proc #=> Proc.new { |i| i.reverse }
気持ちとしてはこんな感じ。 (文法的には間違ってる)
@tag_names.map{&:name}
@tag_names.map{&:name.to_proc}
@tag_names.map{&proc { |tag| tag.name }}
@tag_name.map{ |tag| tag.name }