Class: Highrise::Tag
- Defined in:
- lib/highrise/tag.rb
Constant Summary collapse
{}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.find_by_name(arg) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/highrise/tag.rb', line 8 def self.find_by_name(arg) if @@tags == {} self.find(:all).each do |tag| @@tags[tag.id] = tag @@tags[tag.name] = tag end end @@tags[arg] end |
Instance Method Details
#==(object) ⇒ Object
4 5 6 |
# File 'lib/highrise/tag.rb', line 4 def ==(object) (object.instance_of?(self.class) && object.id == self.id && object.name == self.name) end |