Class: Musicality::SuperCollider::Bundle
- Inherits:
-
Object
- Object
- Musicality::SuperCollider::Bundle
- Defined in:
- lib/musicality/performance/supercollider/bundle.rb
Instance Attribute Summary collapse
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(time, *messages) ⇒ Bundle
constructor
A new instance of Bundle.
- #to_sclang ⇒ Object
Constructor Details
#initialize(time, *messages) ⇒ Bundle
Returns a new instance of Bundle.
6 7 8 9 |
# File 'lib/musicality/performance/supercollider/bundle.rb', line 6 def initialize time, * @time = time @messages = end |
Instance Attribute Details
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
5 6 7 |
# File 'lib/musicality/performance/supercollider/bundle.rb', line 5 def @messages end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
5 6 7 |
# File 'lib/musicality/performance/supercollider/bundle.rb', line 5 def time @time end |
Instance Method Details
#to_sclang ⇒ Object
11 12 13 14 |
# File 'lib/musicality/performance/supercollider/bundle.rb', line 11 def to_sclang raise "Bundle contains no messages" if @messages.empty? "[ #{@time.to_f}, #{@messages.map {|m| m.to_sclang }.join(", ")} ]" end |