Created
June 2, 2009 21:33
-
-
Save dmichael/122610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SoundFile | |
attr_reader :binaries | |
delegate :info, :to => :binaries | |
def initialize | |
@binaries = Binaries.instance | |
end | |
end | |
module Binaries | |
class <<self | |
def instance | |
@instance ||= | |
if windows? | |
Windows.new | |
else | |
Nix.new | |
end | |
end | |
end | |
class Windows | |
def info | |
`./bin/sndfile-info.exe` | |
end | |
end | |
class Nix | |
def info | |
`./bin/sndfile-info` | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment