Class: Taglish::Tag

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Util
Defined in:
lib/taglish/tag.rb

Instance Method Summary collapse

Instance Method Details

#==(object) ⇒ Object



12
13
14
# File 'lib/taglish/tag.rb', line 12

def ==(object)
  super || (object.is_a?(Tag) && name == object.name)
end

#countObject



20
21
22
# File 'lib/taglish/tag.rb', line 20

def count
  read_attribute(:count).to_i
end

#to_sObject



16
17
18
# File 'lib/taglish/tag.rb', line 16

def to_s
  name
end