Class: Talks::Hooks::Voice

Inherits:
Base
  • Object
show all
Defined in:
lib/talks/hooks/voice.rb

Class Method Summary collapse

Methods inherited from Base

default_message_method, message_method, message_name

Class Method Details

.one_dash_argvObject



7
# File 'lib/talks/hooks/voice.rb', line 7

def one_dash_argv; '-v'; end

.to_hook(opts, cmd) ⇒ Object



10
11
12
13
# File 'lib/talks/hooks/voice.rb', line 10

def to_hook(opts, cmd)
  opts[one_dash_argv] || opts[two_dashes_argv] ||
    Talks.config.voice_for(cmd.to_sym) || Talks.config.default_voice
end

.two_dashes_argvObject



8
# File 'lib/talks/hooks/voice.rb', line 8

def two_dashes_argv; '--voice'; end