Sha256: 79e58d173aa93c3dc458730cd1b6df2bebcc2b882cbe7d41311c2499e28c5d01

Contents?: true

Size: 300 Bytes

Versions: 2

Compression:

Stored size: 300 Bytes

Contents

module Joint
  class IO
    attr_accessor :name, :content, :type, :size

    def initialize(attrs={})
      attrs.each { |key, value| send("#{key}=", value) }
      @type ||= 'plain/text'
      @size ||= @content.size unless @content.nil?
    end

    alias path name
    alias read content
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
jamieorc-joint-0.5.6 lib/joint/io.rb
joint-0.5.5 lib/joint/io.rb