Class: EasyTag::BaseTagger

Inherits:
Object
  • Object
show all
Defined in:
lib/easytag/taggers/base.rb

Direct Known Subclasses

FLACTagger, MP3Tagger, MP4Tagger, OggTagger

Instance Attribute Summary collapse

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, **kwargs) ⇒ Object



13
14
15
16
# File 'lib/easytag/taggers/base.rb', line 13

def method_missing(method, *args, **kwargs)
  warn "#{self.class.name}##{method} does not exist"
  method.to_s[-1].eql?('?') ? false : nil
end

Instance Attribute Details

#taglibObject (readonly)

Returns the value of attribute taglib.



3
4
5
# File 'lib/easytag/taggers/base.rb', line 3

def taglib
  @taglib
end

Instance Method Details

#closeObject



9
10
11
# File 'lib/easytag/taggers/base.rb', line 9

def close
  taglib.close
end

#yearObject



5
6
7
# File 'lib/easytag/taggers/base.rb', line 5

def year
  date.nil? ? 0 : date.year
end