Class: Phonemico::Runner
- Inherits:
-
Object
- Object
- Phonemico::Runner
- Defined in:
- lib/phonemico.rb
Instance Method Summary collapse
-
#initialize(features, console = HighLine.new) ⇒ Runner
constructor
A new instance of Runner.
- #run ⇒ Object
Constructor Details
#initialize(features, console = HighLine.new) ⇒ Runner
Returns a new instance of Runner.
75 76 77 78 |
# File 'lib/phonemico.rb', line 75 def initialize(features, console = HighLine.new) @features = features @highline = console end |
Instance Method Details
#run ⇒ Object
80 81 82 83 84 85 86 87 |
# File 'lib/phonemico.rb', line 80 def run @highline.choose do || .choice('List all features for a given sound') {find_features} .choice('List all sounds that share a given feature value') {find_phonemes} .choice('List all shared features for two or more sounds') {find_common_features} .prompt = 'What would you like to do?' end end |