Module: EacRubyUtils::Speaker::Sender
- Defined in:
- lib/eac_ruby_utils/speaker/sender.rb
Instance Method Summary collapse
- #compact_infov(*attributes) ⇒ self
-
#input(question, options = {}) ⇒ Object
Options:
bool
([Boolean], default:false
): requires a answer “yes” or “no”. -
#speaker_receiver ⇒ EacRubyUtils::Speaker::Receiver
Shortcut to [EacRubyUtils::Speaker.current_receiver].
Instance Method Details
#compact_infov(*attributes) ⇒ self
20 21 22 23 24 25 26 |
# File 'lib/eac_ruby_utils/speaker/sender.rb', line 20 def compact_infov(*attributes) ::EacRubyUtils::Compact.new(self, attributes).to_h.each do |k, v| infov k, v end self end |
#input(question, options = {}) ⇒ Object
Options:
+bool+ ([Boolean], default: +false+): requires a answer "yes" or "no".
+list+ ([Hash] or [Array], default: +nil+): requires a answer from a list.
+noecho+ ([Boolean], default: +false+): does not output answer.
32 33 34 |
# File 'lib/eac_ruby_utils/speaker/sender.rb', line 32 def input(question, = {}) speaker_receiver.input(question, ) end |
#speaker_receiver ⇒ EacRubyUtils::Speaker::Receiver
Shortcut to [EacRubyUtils::Speaker.current_receiver].
14 15 16 |
# File 'lib/eac_ruby_utils/speaker/sender.rb', line 14 def speaker_receiver ::EacRubyUtils::Speaker.current_receiver end |