Class: Mml2wav::Command

Inherits:
Object
  • Object
show all
Defined in:
lib/mml2wav/command.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(arguments) ⇒ Command

Returns a new instance of Command.



11
12
13
14
# File 'lib/mml2wav/command.rb', line 11

def initialize(arguments)
  @options = parse_options(arguments)
  @sounds = ARGF.readlines.join(" ")
end

Class Method Details

.run(arguments) ⇒ Object



7
8
9
# File 'lib/mml2wav/command.rb', line 7

def self.run(arguments)
  new(arguments).run
end

Instance Method Details

#runObject



16
17
18
# File 'lib/mml2wav/command.rb', line 16

def run
  Wave.write(@sounds, @options)
end