Class: Texas::Task::Base
- Inherits:
-
Object
- Object
- Texas::Task::Base
- Includes:
- OutputHelper
- Defined in:
- lib/texas/task/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #build(klass = Build::Dry) ⇒ Object
-
#initialize(_options, _build = nil) ⇒ Base
constructor
A new instance of Base.
- #run ⇒ Object
Methods included from OutputHelper
Constructor Details
#initialize(_options, _build = nil) ⇒ Base
Returns a new instance of Base.
7 8 9 10 |
# File 'lib/texas/task/base.rb', line 7 def initialize(, _build = nil) self. = @build = _build if _build end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/texas/task/base.rb', line 5 def end |
Instance Method Details
#build(klass = Build::Dry) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/texas/task/base.rb', line 12 def build(klass = Build::Dry) @build ||= begin b = klass.new() b.run b end end |
#run ⇒ Object
20 21 |
# File 'lib/texas/task/base.rb', line 20 def run end |