Class: Temper::StringIO

Inherits:
Base
  • Object
show all
Defined in:
lib/temper/stringio.rb

Instance Attribute Summary

Attributes inherited from Base

#content_type, #original_filename

Instance Method Summary collapse

Methods inherited from Base

#close, #fingerprint, #method_missing, #respond_to?

Constructor Details

#initialize(options = {}) ⇒ StringIO

Returns a new instance of StringIO.



3
4
5
6
7
# File 'lib/temper/stringio.rb', line 3

def initialize(options = {})
  @storage = ::StringIO.new(options[:content].to_s)
  options[:original_filename] ||= "stringio.txt"
  super options.merge(options)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Temper::Base