Module: Stretto::Tokens::WithAttackDecayToken

Included in:
ChordToken, NoteToken
Defined in:
lib/stretto/grammar/tokens/attack_decay_token.rb

Overview

Include this module to access functionality of attack and decay tokens

See Also:

Instance Method Summary collapse

Instance Method Details

#attackValue?

Returns The attack value wrapped by a Value object, or nil.

Returns:

  • (Value, nil)

    The attack value wrapped by a Value object, or nil



29
30
31
32
# File 'lib/stretto/grammar/tokens/attack_decay_token.rb', line 29

def attack
  attack = attack_and_decay.attack
  Stretto::Value.new(attack)
end

#decayValue?

Returns The decay value wrapped by a Value object, or nil.

Returns:

  • (Value, nil)

    The decay value wrapped by a Value object, or nil



35
36
37
38
# File 'lib/stretto/grammar/tokens/attack_decay_token.rb', line 35

def decay
  decay = attack_and_decay.decay
  Stretto::Value.new(decay)
end