Class: Chamber::Commands::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/chamber/commands/base.rb

Direct Known Subclasses

Compare, Files, Initialize, Secure, Show, Sign, Unsecure, Verify

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(shell: nil, rootpath: nil, dry_run: nil, **args) ⇒ Base

Returns a new instance of Base.



18
19
20
21
22
23
# File 'lib/chamber/commands/base.rb', line 18

def initialize(shell: nil, rootpath: nil, dry_run: nil, **args)
  self.chamber  = Chamber::Instance.new(rootpath: rootpath, **args)
  self.shell    = shell
  self.rootpath = chamber.configuration.rootpath
  self.dry_run  = dry_run
end

Instance Attribute Details

#chamberObject

Returns the value of attribute chamber.



9
10
11
# File 'lib/chamber/commands/base.rb', line 9

def chamber
  @chamber
end

#dry_runObject

Returns the value of attribute dry_run.



9
10
11
# File 'lib/chamber/commands/base.rb', line 9

def dry_run
  @dry_run
end

#rootpathObject

Returns the value of attribute rootpath.



9
10
11
# File 'lib/chamber/commands/base.rb', line 9

def rootpath
  @rootpath
end

#shellObject

Returns the value of attribute shell.



9
10
11
# File 'lib/chamber/commands/base.rb', line 9

def shell
  @shell
end

Class Method Details

.call(**args) ⇒ Object



14
15
16
# File 'lib/chamber/commands/base.rb', line 14

def self.call(**args)
  new(**args).call
end