Module: Musa::Neumalang::Neumalang::Parser::DeltaDurationAttribute Private

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

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Semantic action for differential duration attribute (absolute delta).

Parses absolute duration changes: "+1/4" (add quarter), "-1/2" (subtract half).

Instance Method Summary collapse

Instance Method Details

#durationRational Originally defined in module DurationCalculation

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Calculates duration value.

Returns:

#valueHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Builds delta duration structure.

Returns:

  • (Hash)

    delta_duration attribute



713
714
715
716
717
# File 'lib/musa-dsl/neumalang/neumalang.rb', line 713

def value
  sign = capture(:sign).value

  { delta_duration: sign * duration }
end