Class: Gloo::Objs::Play

Inherits:
GlooLang::Core::Obj
  • Object
show all
Defined in:
lib/gloo/objs/snd/play.rb

Constant Summary collapse

KEYWORD =
'play'.freeze
KEYWORD_SHORT =
'play'.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.messagesObject

Get a list of message names that this object receives.



35
36
37
# File 'lib/gloo/objs/snd/play.rb', line 35

def self.messages
  return super + [ 'run' ]
end

.short_typenameObject

The short name of the object type.



24
25
26
# File 'lib/gloo/objs/snd/play.rb', line 24

def self.short_typename
  return KEYWORD_SHORT
end

.typenameObject

The name of the object type.



17
18
19
# File 'lib/gloo/objs/snd/play.rb', line 17

def self.typename
  return KEYWORD
end

Instance Method Details

#msg_runObject

Play the audio file.



42
43
44
# File 'lib/gloo/objs/snd/play.rb', line 42

def msg_run
  system "afplay #{value}"
end