Sha256: 049d7fcadc1474364c4256035d06003068718bb93cd1a7331a622ae9e2edf840

Contents?: true

Size: 1.01 KB

Versions: 9

Compression:

Stored size: 1.01 KB

Contents

# Volay module
module Volay
  # Mixer module
  module Mixer
    # Default class
    class Default
      ##
      # Up the volume
      #
      def up(*)
        fail NotImplementedError
      end

      ##
      # Down the volume
      #
      def down(*)
        fail NotImplementedError
      end

      ##
      # Set the volume
      #
      def value=(*)
        fail NotImplementedError
      end

      ##
      # Toggle mute
      #
      def toggle
        fail NotImplementedError
      end

      ##
      # Current data, value, max_value,
      # percent and muted
      #
      def current
        fail NotImplementedError
      end

      ##
      # Current value
      #
      def max_value
        current[:value]
      end

      ##
      # Current value
      #
      def value
        current[:value]
      end

      ##
      # Current percent
      #
      def percent
        current[:percent]
      end

      ##
      # Is muted
      #
      def muted?
        current[:muted]
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
volay-1.0.0 lib/volay/mixer/default.rb
volay-0.7.0 lib/volay/mixer/default.rb
volay-0.6.0 lib/volay/mixer/default.rb
volay-0.5.0 lib/volay/mixer/default.rb
volay-0.4.0 lib/volay/mixer/default.rb
volay-0.3.0 lib/volay/mixer/default.rb
volay-0.2.0 lib/volay/mixer/default.rb
volay-0.1.0 lib/volay/mixer/default.rb
volay-0.0.1 lib/volay/mixer/default.rb