Class: PGit::Command::Application

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/pgit/command/application.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(global_opts, opts, args) ⇒ Application

Returns a new instance of Application.



9
10
11
12
13
14
15
16
17
18
# File 'lib/pgit/command/application.rb', line 9

def initialize(global_opts, opts, args)
  configuration = PGit::Configuration.new
  @current_project = PGit::CurrentProject.new(configuration)
  @global_opts = global_opts
  @command = PGit::Command.new(opts.fetch("name") { :no_name_provided },
                               opts.fetch("steps") { [:no_steps_provided] },
                               @current_project)
  @args = args
  @opts = opts
end

Instance Attribute Details

#argsObject (readonly)

Returns the value of attribute args.



8
9
10
# File 'lib/pgit/command/application.rb', line 8

def args
  @args
end

#commandObject (readonly)

Returns the value of attribute command.



8
9
10
# File 'lib/pgit/command/application.rb', line 8

def command
  @command
end

#current_projectObject (readonly)

Returns the value of attribute current_project.



8
9
10
# File 'lib/pgit/command/application.rb', line 8

def current_project
  @current_project
end

#global_optsObject (readonly)

Returns the value of attribute global_opts.



8
9
10
# File 'lib/pgit/command/application.rb', line 8

def global_opts
  @global_opts
end

#optsObject (readonly)

Returns the value of attribute opts.



8
9
10
# File 'lib/pgit/command/application.rb', line 8

def opts
  @opts
end