Class: Texas::Task::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/texas/task/base.rb

Direct Known Subclasses

NewProject, Watch

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_options, _build = nil) ⇒ Base

Returns a new instance of Base.



6
7
8
9
# File 'lib/texas/task/base.rb', line 6

def initialize(_options, _build = nil)
  self.options = _options
  @build = _build if _build
end

Instance Attribute Details

#optionsObject

Returns the value of attribute options.



4
5
6
# File 'lib/texas/task/base.rb', line 4

def options
  @options
end

Instance Method Details

#build(klass = Build::Dry) ⇒ Object



11
12
13
# File 'lib/texas/task/base.rb', line 11

def build(klass = Build::Dry)
  @build ||= klass.run(options)
end

#runObject



15
16
# File 'lib/texas/task/base.rb', line 15

def run
end