Class: Cir::Cli::Command

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

Overview

Wrapper class describing general command

Direct Known Subclasses

CommandWithRepository, InitCommand

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCommand

Initiation of the object will get CIR_HOME



26
27
28
# File 'lib/cir/cli/command.rb', line 26

def initialize
  @cirHome = File.expand_path(ENV['CIR_HOME'] || "~/.cir/repository")
end

Instance Attribute Details

#argsObject

Attributes for parsed command line arguments



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

def args
  @args
end

#filesObject

Attributes for parsed command line arguments



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

def files
  @files
end

#global_argsObject

Attributes for parsed command line arguments



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

def global_args
  @global_args
end

Instance Method Details

#optsObject

Parameter parser for this command



32
33
# File 'lib/cir/cli/command.rb', line 32

def opts
end

#processObject

Process given command with both global and command specific arguments on top of given files



37
38
# File 'lib/cir/cli/command.rb', line 37

def process
end