Class: Hookers::Commands::Pivotal

Inherits:
Object
  • Object
show all
Includes:
Hookers::Command
Defined in:
lib/hookers/commands/pivotal.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Hookers::Command

included, #parse_options

Constructor Details

#initialize(command, args) ⇒ Pivotal

Returns a new instance of Pivotal.



16
17
18
# File 'lib/hookers/commands/pivotal.rb', line 16

def initialize(command, args)
  self.options = parse_options(args)
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



8
9
10
# File 'lib/hookers/commands/pivotal.rb', line 8

def options
  @options
end

Class Method Details

.slopObject



10
11
12
13
14
# File 'lib/hookers/commands/pivotal.rb', line 10

def self.slop
  Slop.new(help: true) do
    on :"api-token", "Pivotal user token to sync commits", argument: true
  end
end

Instance Method Details

#runObject



20
21
22
# File 'lib/hookers/commands/pivotal.rb', line 20

def run
  puts Hookers::Pivotal::TrackerProject.new(options[:"api-token"]).notify_changes
end