Class: Ramekin::Element

Inherits:
Object
  • Object
show all
Defined in:
lib/ramekin/element.rb

Direct Known Subclasses

Instrument, LegatoStart, MacroDefinition, NoteEvent, Token

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#channelObject

Returns the value of attribute channel.



9
10
11
# File 'lib/ramekin/element.rb', line 9

def channel
  @channel
end

#componentsObject

Returns the value of attribute components.



7
8
9
# File 'lib/ramekin/element.rb', line 7

def components
  @components
end

#macro_stackObject



12
13
14
# File 'lib/ramekin/element.rb', line 12

def macro_stack
  @macro_stack ||= []
end

#start_tickObject

Returns the value of attribute start_tick.



8
9
10
# File 'lib/ramekin/element.rb', line 8

def start_tick
  @start_tick
end

Class Method Details

.make(components, *a) ⇒ Object



3
4
5
# File 'lib/ramekin/element.rb', line 3

def self.make(components, *a)
  new(*a).tap { |e| e.components = components }
end

Instance Method Details

#finObject



20
21
22
# File 'lib/ramekin/element.rb', line 20

def fin
  @components.last.fin
end

#startObject



16
17
18
# File 'lib/ramekin/element.rb', line 16

def start
  @components.first.start
end