module ActsAsHasselhoff::InstanceMethods

Public Instance Methods

play_watch() click to toggle source
# File lib/acts_as_hasselhoff.rb, line 10
def play_watch
  gem_root = Gem::Specification.find_by_name('acts_as_hasselhoff').gem_dir
  play_bin = File.join(gem_root, 'bin', 'play')
  theme_song = File.join(gem_root, 'data', 'sounds', 'theme.m4a')

  Process.spawn("#{play_bin} #{theme_song}")

  message = PutsSlowly.new('Saving ... in ... slow ... motion ...')
  message.run(1.0)
end