Class: Gisture::ClonedFile

Inherits:
File
  • Object
show all
Defined in:
lib/gisture/cloned_file.rb

Constant Summary

Constants inherited from File

File::STRATEGIES

Instance Attribute Summary collapse

Attributes inherited from File

#basename, #file, #strategy

Instance Method Summary collapse

Methods inherited from File

#extname, #localize!, #method_missing, #respond_to_missing?, #run!, #tempfile

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Gisture::File

Instance Attribute Details

#clone_pathObject (readonly)

Returns the value of attribute clone_path.



3
4
5
# File 'lib/gisture/cloned_file.rb', line 3

def clone_path
  @clone_path
end

Instance Method Details

#eval!(*args, &block) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/gisture/cloned_file.rb', line 21

def eval!(*args, &block)
  @cwd = Dir.pwd
  Dir.chdir clone_path
  super
ensure
  Dir.chdir @cwd
end

#exec!(*args, &block) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/gisture/cloned_file.rb', line 29

def exec!(*args, &block)
  @cwd = Dir.pwd
  Dir.chdir clone_path
  super
ensure
  Dir.chdir @cwd
end

#load!(*args, &block) ⇒ Object



13
14
15
16
17
18
19
# File 'lib/gisture/cloned_file.rb', line 13

def load!(*args, &block)
  @cwd = Dir.pwd
  Dir.chdir clone_path
  super
ensure
  Dir.chdir @cwd
end

#require!(*args, &block) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/gisture/cloned_file.rb', line 5

def require!(*args, &block)
  @cwd = Dir.pwd
  Dir.chdir clone_path
  super
ensure
  Dir.chdir @cwd
end


37
38
39
# File 'lib/gisture/cloned_file.rb', line 37

def unlink_tempfile
  false
end