Class: PowerPointer::ExportFile

Inherits:
Object
  • Object
show all
Defined in:
lib/powerpointer/export_file.rb

Instance Method Summary collapse

Constructor Details

#initialize(path, filename) ⇒ ExportFile

Returns a new instance of ExportFile.



3
4
5
6
7
# File 'lib/powerpointer/export_file.rb', line 3

def initialize(path, filename)
    @path = path
    @filename = filename
    @content = ""
end

Instance Method Details

#<<(content) ⇒ Object



9
10
11
# File 'lib/powerpointer/export_file.rb', line 9

def <<(content)
    @content << content
end

#get_contentObject



13
14
15
# File 'lib/powerpointer/export_file.rb', line 13

def get_content
    @content
end

#get_filenameObject



21
22
23
# File 'lib/powerpointer/export_file.rb', line 21

def get_filename
    @filename
end

#get_full_path(leading_slash = false) ⇒ Object



25
26
27
28
29
30
31
# File 'lib/powerpointer/export_file.rb', line 25

def get_full_path (leading_slash = false)
    if leading_slash
        return "/" + @path + @filename
    else
        return @path + @filename
    end
end

#get_pathObject



17
18
19
# File 'lib/powerpointer/export_file.rb', line 17

def get_path
    @path
end