class Alda::REPL::TempScore

The score object used in Alda::REPL.

Includes Alda, so it can refer to alda commandline.

When you are in an REPL session, you are actually in an instance of this class, so you can call the instance methods down here when you play with an REPL.

Public Class Methods

new(session) click to toggle source
Calls superclass method Alda::Score::new
# File lib/alda-rb/repl.rb, line 82
def initialize session
  super()
  @session = session
end

Public Instance Methods

clear_history() click to toggle source
# File lib/alda-rb/repl.rb, line 95
def clear_history
  @session.clear_history
end
Also aliased as: new
get_binding() click to toggle source
# File lib/alda-rb/repl.rb, line 99
def get_binding
  binding
end
history() click to toggle source
# File lib/alda-rb/repl.rb, line 91
def history
  @session.history.to_s
end
map() click to toggle source
# File lib/alda-rb/repl.rb, line 107
def map
  puts JSON.generate JSON.parse(parse),
                     indent: '  ', space: ' ', object_nl: ?\n, array_nl: ?\n
end
new()
Alias for: clear_history
score() click to toggle source
# File lib/alda-rb/repl.rb, line 103
def score
  puts history
end
to_s() click to toggle source
# File lib/alda-rb/repl.rb, line 87
def to_s
  history
end