Class: Chamber::Commands::Base
- Inherits:
-
Object
- Object
- Chamber::Commands::Base
- Defined in:
- lib/chamber/commands/base.rb
Instance Attribute Summary collapse
-
#chamber ⇒ Object
Returns the value of attribute chamber.
-
#dry_run ⇒ Object
Returns the value of attribute dry_run.
-
#rootpath ⇒ Object
Returns the value of attribute rootpath.
-
#shell ⇒ Object
Returns the value of attribute shell.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(shell: nil, rootpath: nil, dry_run: nil, **args) ⇒ Base
constructor
A new instance of Base.
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
#chamber ⇒ Object
Returns the value of attribute chamber.
9 10 11 |
# File 'lib/chamber/commands/base.rb', line 9 def chamber @chamber end |
#dry_run ⇒ Object
Returns the value of attribute dry_run.
9 10 11 |
# File 'lib/chamber/commands/base.rb', line 9 def dry_run @dry_run end |
#rootpath ⇒ Object
Returns the value of attribute rootpath.
9 10 11 |
# File 'lib/chamber/commands/base.rb', line 9 def rootpath @rootpath end |
#shell ⇒ Object
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 |