Class: Formator
- Inherits:
-
Object
- Object
- Formator
- Defined in:
- lib/euclidean_sequencer/formator.rb
Class Method Summary collapse
Class Method Details
.format_sequence(sequence:, options: {array: nil, offset: nil}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/euclidean_sequencer/formator.rb', line 3 def self.format_sequence(sequence:, options: {array: nil, offset: nil}) if [:array] && ![:offset] return convert_to_array(sequence) end if [:array] && [:offset] return offset(convert_to_array(sequence), [:offset]) end if [:offset] && ![:array] return offset(sequence, [:offset]) end return sequence end |