Class: JLDrill::LoadFileContext

Inherits:
FileProgressContext show all
Defined in:
lib/jldrill/contexts/LoadFileContext.rb

Overview

Loads a file displaying a progress bar as it is loading.

Instance Attribute Summary

Attributes inherited from Context::Context

#mainView, #parent, #viewBridge

Instance Method Summary collapse

Methods inherited from FileProgressContext

#createViews, #destroyViews, #exit, #exitFileProgressContext, #isValid?, #readFile

Methods inherited from Context::Context

#addView, #createViews, #destroyViews, #exit, #isEntered?, #onExit, #peekAtView, #setupViews

Constructor Details

#initialize(viewBridge) ⇒ LoadFileContext

Returns a new instance of LoadFileContext.



12
13
14
15
16
# File 'lib/jldrill/contexts/LoadFileContext.rb', line 12

def initialize(viewBridge)
	super(viewBridge)
          @file = nil
          @filename = nil
end

Instance Method Details

#enter(parent, file, filename) ⇒ Object

File is any file of type DataFile Filename is the filename you want to open



20
21
22
23
24
# File 'lib/jldrill/contexts/LoadFileContext.rb', line 20

def enter(parent, file, filename)
    @file = file
    @filename = filename
    super(parent)
end

#getFileObject



31
32
33
# File 'lib/jldrill/contexts/LoadFileContext.rb', line 31

def getFile
    return @file
end

#getFilenameObject

Returns the filename of the dictionary including the path



27
28
29
# File 'lib/jldrill/contexts/LoadFileContext.rb', line 27

def getFilename
    return @filename
end