Module: Noise::Modifier
- Defined in:
- lib/noise/pattern.rb
Defined Under Namespace
Class Method Summary collapse
Class Method Details
.parse(s) ⇒ Object
| 88 89 90 91 92 93 94 95 96 97 | # File 'lib/noise/pattern.rb', line 88 def self.parse(s) if s.start_with?('psk') index = s.gsub(/psk/, '').to_i Modifier::Psk.new(index) elsif s == 'fallback' Modifier::Fallback.new else raise Noise::Exceptions::UnsupportedModifierError end end |