Sha256: 694dec3408e7b905ec481487cf7d44666bf068e99f6bbde13caeacf0765ce776

Contents?: true

Size: 575 Bytes

Versions: 6

Compression:

Stored size: 575 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

  module Mp3FileMethods #:nodoc:
    def get32bits
      (getc << 24) + (getc << 16) + (getc << 8) + getc
    end

    def get_syncsafe
      (getc << 21) + (getc << 14) + (getc << 7) + getc
    end
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-mp3info-0.5.1 lib/mp3info/extension_modules.rb
ruby-mp3info-0.6.1 lib/mp3info/extension_modules.rb
ruby-mp3info-0.6.4 lib/mp3info/extension_modules.rb
ruby-mp3info-0.6 lib/mp3info/extension_modules.rb
ruby-mp3info-0.6.2 lib/mp3info/extension_modules.rb
ruby-mp3info-0.6.3 lib/mp3info/extension_modules.rb