Class: Cir::Cli::CommandWithRepository

Inherits:
Command
  • Object
show all
Defined in:
lib/cir/cli/command_with_repository.rb

Overview

Parent command class that initializes repository instance

Instance Attribute Summary collapse

Attributes inherited from Command

#args, #files, #global_args

Instance Method Summary collapse

Methods inherited from Command

#opts, #process

Constructor Details

#initializeCommandWithRepository

Returns a new instance of CommandWithRepository.



24
25
26
27
28
29
30
# File 'lib/cir/cli/command_with_repository.rb', line 24

def initialize
  # Initialize parent class first
  super

  # For all our other commands we need to have repository available
  self.repository = Cir::Repository.new(@cirHome)
end

Instance Attribute Details

#repositoryObject

Repository instance



22
23
24
# File 'lib/cir/cli/command_with_repository.rb', line 22

def repository
  @repository
end