Class: IronWorkerNG::Code::Container::Base
- Inherits:
-
Object
- Object
- IronWorkerNG::Code::Container::Base
- Defined in:
- lib/iron_worker_ng/code/container/base.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#runner_additions ⇒ Object
readonly
Returns the value of attribute runner_additions.
Instance Method Summary collapse
- #add(dest, src) ⇒ Object
- #clear_dest(dest) ⇒ Object
- #close ⇒ Object
- #commit ⇒ Object
- #get_output_stream(dest, &block) ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #runner_add(runner_code) ⇒ Object
Constructor Details
#initialize ⇒ Base
Returns a new instance of Base.
11 12 13 14 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 11 def initialize @name = ::Dir.tmpdir + '/' + ::Dir::Tmpname.make_tmpname('iron-worker-ng-', 'container') @runner_additions = '' end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 8 def name @name end |
#runner_additions ⇒ Object (readonly)
Returns the value of attribute runner_additions.
9 10 11 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 9 def runner_additions @runner_additions end |
Instance Method Details
#add(dest, src) ⇒ Object
22 23 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 22 def add(dest, src) end |
#clear_dest(dest) ⇒ Object
16 17 18 19 20 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 16 def clear_dest(dest) dest = Pathname.new(dest).cleanpath.to_s unless dest.empty? dest end |
#close ⇒ Object
31 32 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 31 def close end |
#commit ⇒ Object
28 29 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 28 def commit end |
#get_output_stream(dest, &block) ⇒ Object
25 26 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 25 def get_output_stream(dest, &block) end |
#runner_add(runner_code) ⇒ Object
34 35 36 |
# File 'lib/iron_worker_ng/code/container/base.rb', line 34 def runner_add(runner_code) @runner_additions << runner_code << "\n" end |