Module: Musa::Datasets::PS

Includes:
AbsD, Helper
Defined in:
lib/musa-dsl/datasets/ps.rb

Constant Summary collapse

NaturalKeys =
(NaturalKeys + [:from, :to, :right_open]).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AbsD

#duration, #forward_duration, is_compatible?, #note_duration, to_AbsD

Methods included from E

#validate!

Instance Attribute Details

#base_durationObject

Returns the value of attribute base_duration.



14
15
16
# File 'lib/musa-dsl/datasets/ps.rb', line 14

def base_duration
  @base_duration
end

Instance Method Details

#to_absIObject



28
29
30
# File 'lib/musa-dsl/datasets/ps.rb', line 28

def to_absI
  # TODO ?????
end

#to_gdvObject



24
25
26
# File 'lib/musa-dsl/datasets/ps.rb', line 24

def to_gdv
  # TODO ?????
end

#to_neumaObject



16
17
18
# File 'lib/musa-dsl/datasets/ps.rb', line 16

def to_neuma
  # TODO ???????
end

#to_pdvObject



20
21
22
# File 'lib/musa-dsl/datasets/ps.rb', line 20

def to_pdv
  # TODO ??????
end

#valid?Boolean

Returns:

  • (Boolean)


32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/musa-dsl/datasets/ps.rb', line 32

def valid?
  case self[:from]
  when Array
    self[:to].is_a?(Array) &&
        self[:from].size == self[:to].size
  when Hash
    self[:to].is_a?(Hash) &&
        self[:from].keys == self[:to].keys
  else
    false
  end && self[:duration].is_a?(Numeric) && self[:duration] > 0
end