Class: Worque::Command::Push

Inherits:
Object
  • Object
show all
Defined in:
lib/worque/command/push.rb

Defined Under Namespace

Classes: Options

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Push

Returns a new instance of Push.



8
9
10
# File 'lib/worque/command/push.rb', line 8

def initialize(options)
  @options = options
end

Class Method Details

.run(options) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/worque/command/push.rb', line 17

def self.run(options)
  require 'worque/command/push/options'

  Worque::Command::Push.new(
    Worque::Command::Push::Options.new(options)
  ).call()
end

Instance Method Details

#callObject



12
13
14
15
# File 'lib/worque/command/push.rb', line 12

def call
  slack = Worque::Utils::Slack.new(options.token)
  JSON.dump(slack.post(options.channel, report_file_content))
end