Class: StringFile
- Inherits:
-
StringIO
- Object
- StringIO
- StringFile
- Defined in:
- lib/string_file.rb
Instance Attribute Summary collapse
-
#filepath ⇒ Object
Returns the value of attribute filepath.
Instance Method Summary collapse
-
#initialize(*args) ⇒ StringFile
constructor
A new instance of StringFile.
- #original_filename ⇒ Object
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
#filepath ⇒ Object
Returns the value of attribute filepath.
2 3 4 |
# File 'lib/string_file.rb', line 2 def filepath @filepath end |
Instance Method Details
#original_filename ⇒ Object
9 10 11 |
# File 'lib/string_file.rb', line 9 def original_filename File.basename(filepath) end |