Module: EacRubyUtils::Speaker::Sender

Defined in:
lib/eac_ruby_utils/speaker/sender.rb

Instance Method Summary collapse

Instance Method Details

#compact_infov(*attributes) ⇒ self

Parameters:

  • attributes (Enumerable<Symbol>)

    Attributes for EacRubyUtils::Compact.new.

Returns:

  • (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, options = {})
  speaker_receiver.input(question, options)
end

#speaker_receiverEacRubyUtils::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