Class: Blender::Driver::Base
- Inherits:
-
Object
- Object
- Blender::Driver::Base
- Defined in:
- lib/blender/drivers/base.rb
Defined Under Namespace
Classes: ExecOutput
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#events ⇒ Object
readonly
Returns the value of attribute events.
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
- #execute(tasks, hosts) ⇒ Object
-
#initialize(config = {}) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(config = {}) ⇒ Base
Returns a new instance of Base.
27 28 29 30 31 32 33 |
# File 'lib/blender/drivers/base.rb', line 27 def initialize(config = {}) cfg = config.dup @stdout = cfg.delete(:stdout) || File.open(File::NULL, 'w') @stderr = cfg.delete(:stderr) || File.open(File::NULL, 'w') @events = cfg.delete(:events) or fail 'Events needed' @config = cfg end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
23 24 25 |
# File 'lib/blender/drivers/base.rb', line 23 def config @config end |
#events ⇒ Object (readonly)
Returns the value of attribute events.
23 24 25 |
# File 'lib/blender/drivers/base.rb', line 23 def events @events end |
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
23 24 25 |
# File 'lib/blender/drivers/base.rb', line 23 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
23 24 25 |
# File 'lib/blender/drivers/base.rb', line 23 def stdout @stdout end |
Instance Method Details
#execute(tasks, hosts) ⇒ Object
35 36 37 |
# File 'lib/blender/drivers/base.rb', line 35 def execute(tasks, hosts) raise RuntimeError, 'this method must be overridden' end |