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

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

Instance Method Summary collapse

Instance Method Details

#valueObject



265
266
267
268
269
270
271
272
273
274
275
276
277
# File 'lib/musa-dsl/neumalang/neumalang.rb', line 265

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