P
petermichaux
Hi
This is in the Rails acts_as_list module but I think is a general Ruby
question. I don't understand the syntax of the ::#{self.name}
statement. I haven't seen :: without something preceding it. I think I
understand what this method enables the plugin to do: use the class
name in which the module is mixed.
Thanks,
Peter
module ActiveRecord
module Acts
module List
def acts_as_list_class
::#{self.name}
end
end
end
end
This is in the Rails acts_as_list module but I think is a general Ruby
question. I don't understand the syntax of the ::#{self.name}
statement. I haven't seen :: without something preceding it. I think I
understand what this method enables the plugin to do: use the class
name in which the module is mixed.
Thanks,
Peter
module ActiveRecord
module Acts
module List
def acts_as_list_class
::#{self.name}
end
end
end
end