Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 9f08fcc976
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (18 sloc) 0.406 kb
require 'stringio'
module Joint
class IO
attr_accessor :name, :content, :type, :size
def initialize(attrs={})
attrs.each { |key, value| send("#{key}=", value) }
@type ||= 'plain/text'
end
def content=(value)
@io = StringIO.new(value || nil)
@size = value ? value.size : 0
end
def read(*args)
@io.read(*args)
end
alias path name
end
end
Jump to Line
Something went wrong with that request. Please try again.