Module: EasyTag::Tagger::ClassMethods

Included in:
EasyTag::Tagger
Defined in:
lib/easy_tag/tagger.rb

Overview

end of included

Instance Method Summary collapse

Instance Method Details

#get_id(tagger) ⇒ Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/easy_tag/tagger.rb', line 18

def get_id(tagger)
  if tagger.is_a?(Integer)
    tagger_id = tagger
  elsif tagger.is_tagger?
    tagger_id = tagger.id
  else
    raise EasyTag::InvalidTagger
  end
  tagger_id
end