Class: Musicality::SuperCollider::Message
- Inherits:
-
Object
- Object
- Musicality::SuperCollider::Message
- Defined in:
- lib/musicality/performance/supercollider/message.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#args ⇒ Object
readonly
Returns the value of attribute args.
Instance Method Summary collapse
-
#initialize(address, *args) ⇒ Message
constructor
A new instance of Message.
- #to_sclang ⇒ Object
Constructor Details
#initialize(address, *args) ⇒ Message
Returns a new instance of Message.
6 7 8 9 |
# File 'lib/musicality/performance/supercollider/message.rb', line 6 def initialize address, *args @address = address @args = args end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
5 6 7 |
# File 'lib/musicality/performance/supercollider/message.rb', line 5 def address @address end |
#args ⇒ Object (readonly)
Returns the value of attribute args.
5 6 7 |
# File 'lib/musicality/performance/supercollider/message.rb', line 5 def args @args end |
Instance Method Details
#to_sclang ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/musicality/performance/supercollider/message.rb', line 11 def to_sclang arg_strs = @args.map do |arg| case arg when Symbol, String "\"#{arg.to_s}\"" else arg.to_s end end "[\"#{@address}\", #{arg_strs.join(", ")}]" end |