Class: MorseCode::Encoders::English
- Defined in:
- lib/morse_code/encoders/english.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
inherited, #initialize, #supported_class
Constructor Details
This class inherits a constructor from MorseCode::Encoders::Base
Instance Method Details
#encode ⇒ Object
12 13 14 |
# File 'lib/morse_code/encoders/english.rb', line 12 def encode MorseCode::ENCODE_MAP[word] end |
#supported? ⇒ Boolean
8 9 10 |
# File 'lib/morse_code/encoders/english.rb', line 8 def supported? !MorseCode::ENCODE_MAP[word].nil? end |