Class: IronWorkerNG::Code::Container::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/iron_worker_ng/code/container/base.rb

Direct Known Subclasses

Dir, Zip

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBase

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

#nameObject (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_additionsObject (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

#closeObject



31
32
# File 'lib/iron_worker_ng/code/container/base.rb', line 31

def close
end

#commitObject



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