Class: StringFile

Inherits:
StringIO
  • Object
show all
Defined in:
lib/string_file.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ StringFile

Returns a new instance of StringFile.



4
5
6
7
# File 'lib/string_file.rb', line 4

def initialize(*args)
  super(*args[1..-1])
  @filepath = args[0]
end

Instance Attribute Details

#filepathObject

Returns the value of attribute filepath.



2
3
4
# File 'lib/string_file.rb', line 2

def filepath
  @filepath
end

Instance Method Details

#original_filenameObject



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

def original_filename
  File.basename(filepath)
end