Class: RSGem::Tasks::Base
- Inherits:
-
Object
- Object
- RSGem::Tasks::Base
- Includes:
- Output
- Defined in:
- lib/rsgem/tasks/base.rb
Overview
Base class for task objects. Child classes must implement the instance method perform
.
Direct Known Subclasses
AddCIProvider, AddCodeAnalysis, AddDependency, BundleDependencies, CleanGemfile, CleanGemspec, CreateGem, EnsureAuthor, IgnoreGemfileLock, RunRubocop, SetBundledFiles, SetLicenseFile, SetRequiredRubyVersion, SimpleCovPostInstall
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(context:, **args) ⇒ Base
constructor
A new instance of Base.
Methods included from Output
Constructor Details
#initialize(context:, **args) ⇒ Base
Returns a new instance of Base.
14 15 16 17 |
# File 'lib/rsgem/tasks/base.rb', line 14 def initialize(context:, **args) @context = context @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
12 13 14 |
# File 'lib/rsgem/tasks/base.rb', line 12 def args @args end |
#context ⇒ Object (readonly)
Returns the value of attribute context.
12 13 14 |
# File 'lib/rsgem/tasks/base.rb', line 12 def context @context end |
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'lib/rsgem/tasks/base.rb', line 19 def call with_output do perform end end |