Class: MyCLI

Inherits:
Thor
  • Object
show all
Includes:
Mmailer::Client
Defined in:
lib/mmailer/commands.rb

Instance Method Summary collapse

Methods included from Mmailer::Client

#client

Instance Method Details

#configObject



42
43
44
# File 'lib/mmailer/commands.rb', line 42

def config
    client(:config, options)
end

#pauseObject



18
19
20
# File 'lib/mmailer/commands.rb', line 18

def pause
  client(:pause)
end

#resumeObject



23
24
25
# File 'lib/mmailer/commands.rb', line 23

def resume
  client(:resume)
end

#serverObject



7
8
9
10
# File 'lib/mmailer/commands.rb', line 7

def server
  require 'mmailer'
  Mmailer.start_server
end

#start(from = 0) ⇒ Object



13
14
15
# File 'lib/mmailer/commands.rb', line 13

def start(from=0)
  client(:start, from.to_i)
end

#stopObject



28
29
30
# File 'lib/mmailer/commands.rb', line 28

def stop
  client(:stop)
end

#versionObject



33
34
35
36
# File 'lib/mmailer/commands.rb', line 33

def version
  require 'mmailer/version'
  puts Mmailer::VERSION
end