class Ckeditor::Http::UploadedFile
Create tempfile from hash
Attributes
content_type[RW]
headers[RW]
original_filename[RW]
tempfile[RW]
Public Class Methods
new(hash)
click to toggle source
# File lib/ckeditor/http.rb, line 10 def initialize(hash) @original_filename = hash[:filename] @content_type = hash[:type] @headers = hash[:head] @tempfile = hash[:tempfile] raise(ArgumentError, ':tempfile is required') unless @tempfile end
Public Instance Methods
open()
click to toggle source
# File lib/ckeditor/http.rb, line 18 def open @tempfile.open end
path()
click to toggle source
# File lib/ckeditor/http.rb, line 22 def path @tempfile.path end
read(*args)
click to toggle source
# File lib/ckeditor/http.rb, line 26 def read(*args) @tempfile.read(*args) end
rewind()
click to toggle source
# File lib/ckeditor/http.rb, line 30 def rewind @tempfile.rewind end
size()
click to toggle source
# File lib/ckeditor/http.rb, line 34 def size @tempfile.size end