Given below is a model from mephisto blogging tool.
class Tag < ActiveRecord::Base
@@tag_parse_regex = /((?:
|)[’"]{0,1})[’"]?\s*(.?)\s(?:[,’"]|$)(?:\1(?:
|$))/
has_many :taggings
class << self
def
find_by_name(tag.to_s)
end
…
…
How to consume the above method and why it in this confusing way. Why
the
name of the method is [] …seems like an index to me. Am I supposed to
consume this method Tag.[1] ?
Thanks.