Sha256: f4afc5c1ff854e590fb05e0ad6a2e235e62c1999ad6e8b4341e09909a88279ac

Contents?: true

Size: 597 Bytes

Versions: 10

Compression:

Stored size: 597 Bytes

Contents

# -*- coding: utf-8 -*-


require 'beeps/ext'
require 'beeps/sound'
require 'beeps/processor'


module Beeps


  extend module ClassMethods

    def be ()
      beep_sound(0.1).play
    end

    def bee ()
      beep_sound(0.3).play
    end

    def beep (time = 0.5)
      beep_sound(time).play
    end

    def beeep ()
      beep_sound(1).play
    end

    def beeeep ()
      beep_sound(1.5).play
    end

    def beeeeep ()
      beep_sound(2).play
    end

    private

      def beep_sound (time)
        Sound.new SquareWave.new, time
      end

    self

  end# ClassMethods


end# Beeps

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
beeps-0.1.21 lib/beeps/beeps.rb
beeps-0.1.20 lib/beeps/beeps.rb
beeps-0.1.18 lib/beeps/beeps.rb
beeps-0.1.16 lib/beeps/beeps.rb
beeps-0.1.15 lib/beeps/beeps.rb
beeps-0.1.14 lib/beeps/beeps.rb
beeps-0.1.13 lib/beeps/beeps.rb
beeps-0.1.12 lib/beeps/beeps.rb
beeps-0.1.11 lib/beeps/beeps.rb
beeps-0.1.10 lib/beeps/beeps.rb