Skip to content

Commit

Permalink
more style updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bleything committed Jan 15, 2009
1 parent 5b9f313 commit 8f0d83e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
12 changes: 6 additions & 6 deletions lib/midiator/drivers/mmj.rb
Expand Up @@ -16,17 +16,17 @@ class MIDIator::Driver::Mmj < MIDIator::Driver # :nodoc:
include_package 'de.humatic.mmj'

def outputs
MidiSystem.get_outputs.inject([{},0]) { |(map, i), out|
[map.update(out => i), i+1]
MidiSystem.get_outputs.inject( [{},0] ) {|(map, i), out|
[ map.update(out => i), i + 1 ]
}.first
end

def open(output = 0)
@out = MidiSystem.open_midi_output(output)
def open( output = 0 )
@out = MidiSystem.open_midi_output( output )
end

def message(*args)
@out.send_midi(args.to_java(:byte))
def message( *args )
@out.send_midi( args.to_java(:byte) )
end

def close
Expand Down
3 changes: 1 addition & 2 deletions lib/midiator/interface.rb
Expand Up @@ -34,8 +34,7 @@ def autodetect_driver
when :linux
:alsa
else
if defined?(Java) &&
Java::java.lang.System.get_property('os.name') == 'Mac OS X'
if defined?( Java ) && Java::java.lang.System.get_property('os.name') == 'Mac OS X'
:mmj
else
raise "No driver is available."
Expand Down

0 comments on commit 8f0d83e

Please sign in to comment.