class Alda::AtMarker

An at-marker event. An Alda::EventContainer containing an Alda::AtMarker can be created using event list sugar. See Alda::EventList#method_missing.

It should be used together with Alda::Marer. For examples, see Alda::Marker.

Attributes

name[RW]

The corresponding marker’s name

Public Class Methods

new(name) → Alda::AtMarker click to toggle source

Creates an Alda::AtMarker.

Underlines “_” in name is converted to hyphens “-”.

Calls superclass method
# File lib/alda-rb/event.rb, line 1069
def initialize name
  super()
  @name = Alda::Utils.snake_to_slug name
end

Public Instance Methods

at_marker == other → true or false click to toggle source

Overrides Alda::Event#==. Returns true if other is an Alda::AtMarker and has the same name as at_marker (using ==).

Calls superclass method Alda::Event#==
# File lib/alda-rb/event.rb, line 1090
def == other
  super || other.is_a?(Alda::AtMarker) && @name == other.name
end
to_alda_code() → String click to toggle source

Overrides Alda::Event#to_alda_code.

# File lib/alda-rb/event.rb, line 1079
def to_alda_code
  ?@ + @name
end