Class: TrackerGitHook::Cli

Inherits:
Object
  • Object
show all
Defined in:
lib/tracker_git_hook/cli.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repo:) ⇒ Cli

Returns a new instance of Cli.



3
4
5
# File 'lib/tracker_git_hook/cli.rb', line 3

def initialize(repo:)
  @repo = repo
end

Instance Attribute Details

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'lib/tracker_git_hook/cli.rb', line 7

def repo
  @repo
end

Instance Method Details

#process_arguments(*args) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/tracker_git_hook/cli.rb', line 9

def process_arguments(*args)
  argument = args[0]

  if argument
    process_argument(argument)
  else
    puts repo.current_story_id
  end
end