Module: Musa::Neumalang::Neumalang::Parser::AbsVelocityAttribute

Defined in:
lib/musa-dsl/neumalang/neumalang.rb

Instance Method Summary collapse

Instance Method Details

#valueObject



254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/musa-dsl/neumalang/neumalang.rb', line 254

def value
  if capture(:p)
    v = -capture(:p).length
  elsif capture(:mp)
    v = 0
  elsif capture(:mf)
    v = 1
  else
    v = capture(:f).length + 1
  end

  { abs_velocity: v }
end