Sha256: bf8a5fc533054073d0f4addf370ee5dbe2ab358b224999a2c6e23ca5ad480aba
Contents?: true
Size: 868 Bytes
Versions: 8
Compression:
Stored size: 868 Bytes
Contents
class Mp3Info module HashKeys #:nodoc: ### lets you specify hash["key"] as hash.key ### this came from CodingInRuby on RubyGarden ### http://www.rubygarden.org/ruby?CodingInRuby def method_missing(meth,*args) m = meth.id2name if /=$/ =~ m self[m.chop] = (args.length<2 ? args[0] : args) else self[m] end end end class ::String if RUBY_VERSION < "1.9.0" alias getbyte [] else def getbyte(i) self[i].ord end end end module Mp3FileMethods #:nodoc: if RUBY_VERSION < "1.9.0" def getbyte getc end end def get32bits (getbyte << 24) + (getbyte << 16) + (getbyte << 8) + getbyte end def get_syncsafe (getbyte << 21) + (getbyte << 14) + (getbyte << 7) + getbyte end end end
Version data entries
8 entries across 8 versions & 1 rubygems