class Alda::LispIdentifier
A lisp identifier event. An Alda::EventContainer containing an Alda::Lisp
It is in fact not a kind of event in alda. However, such a thing is needed when writing some lisp codes in alda.
A standalone lisp identifier is useless. Use it together with Alda::InlineLisp.
Attributes
name[RW]
The name of the lisp identifier.
Public Class Methods
new(name) → Alda::LispIdentifier
click to toggle source
Creates an Alda::LispIdentifier.
Underlines “_” in name is converted to hyphens “-”.
Calls superclass method
# File lib/alda-rb/event.rb, line 1309 def initialize name super() @name = Alda::Utils.snake_to_slug name end
Public Instance Methods
lisp_identifier == other → true or false
click to toggle source
Overrides Alda::Event#==. Returns true if other is an Alda::LispIdentifier and has the same name as lisp_identifier (using ==).
Calls superclass method
Alda::Event#==
# File lib/alda-rb/event.rb, line 1330 def == other super || other.is_a?(Alda::LispIdentifier) && @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 1319 def to_alda_code @name end