Sha256: 9fce626f68e1e7900364b974af71d5b7b45887bf477f969685390f2fa535e532
Contents?: true
Size: 479 Bytes
Versions: 1
Compression:
Stored size: 479 Bytes
Contents
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 def rewind @io.rewind if @io.respond_to?(:rewind) end alias path name end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jamieorc-joint-0.6.2 | lib/joint/io.rb |