Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Modified ypelud's changes to fit my style. Replaced RUBY_PLATFORM wit…

…h Platform gem; used Kent Beck "composed method" to make code smaller; etc.
  • Loading branch information...
commit 0b08ebdb91471fdb91b534b7e0d6632b2b6f4b98 1 parent 55c3413
@gilesbowkett authored
Showing with 9 additions and 6 deletions.
  1. +4 −0 lib/archaeopteryx.rb
  2. +1 −1  lib/arkx.rb
  3. +4 −5 lib/rhythm.rb
View
4 lib/archaeopteryx.rb
@@ -1,5 +1,9 @@
alias :L :lambda
+%w{rubygems platform}.each do |lib|
+ require lib
+end
+
%w{lib/core_ext/struct
lib/arkx
View
2  lib/arkx.rb
@@ -25,7 +25,7 @@ def go
@midi.timer.at((@clock.start + @clock.time) - @evil_timer_offset_wtf, &generate_beats)
end
generate_beats[]
- if RUBY_PLATFORM.include? 'win32' # gets block thread on Windows 10000 is arbitrary
+ if Platform::IMPL == :mswin
puts 'Press CTRL-C to stop'
sleep(10000)
else
View
9 lib/rhythm.rb
@@ -3,12 +3,13 @@ class Rhythm
def initialize(attributes)
# @mutation = attributes[:mutation]
@drumfile = attributes[:drumfile]
- @flash = attributes[:flash] || (RUBY_PLATFORM.include? 'darwin')
reload
end
+ def flash_screen
+ puts "\a" if Platform::IMPL == :macosx
+ end
def reload
- # flash the screen ; only valid on my box and similarly configured machines!
- puts "\a" if @flash
+ flash_screen
@drums = eval(File.read(@drumfile))
end
def notes(beat)
@@ -26,5 +27,3 @@ def mutate(measure)
end
end
end
-
-# probably rename this to make it drum-specific

1 comment on commit 0b08ebd

@aaronlifton

You should edit the wiki so it tells new users that they need the Platform gem. I tried archaeowhatever for the first time today, and I only got it to work by eventually noticing the comment on this commit.

Please sign in to comment.
Something went wrong with that request. Please try again.