Sha256: 75f5d1df10bd8415320df3f4ed040227a385f4d1d57201cb511ad12fb5db827f
Contents?: true
Size: 970 Bytes
Versions: 27
Compression:
Stored size: 970 Bytes
Contents
# Author:: Eric Crane (mailto:eric.crane@mac.com) # Copyright:: Copyright (c) 2020 Eric Crane. All rights reserved. # # Play an audio file (MP3). # module Gloo module Objs class Play < Gloo::Core::Obj KEYWORD = 'play'.freeze KEYWORD_SHORT = 'play'.freeze # # The name of the object type. # def self.typename return KEYWORD end # # The short name of the object type. # def self.short_typename return KEYWORD_SHORT end # --------------------------------------------------------------------- # Messages # --------------------------------------------------------------------- # # Get a list of message names that this object receives. # def self.messages return super + [ 'run' ] end # # Play the audio file. # def msg_run system "afplay #{value}" end end end end
Version data entries
27 entries across 27 versions & 1 rubygems