Class: Joint::IO

Inherits:
Object
  • Object
show all
Defined in:
lib/joint/io.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ IO

Returns a new instance of IO.



7
8
9
10
# File 'lib/joint/io.rb', line 7

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

Instance Attribute Details

#contentObject

Returns the value of attribute content.



5
6
7
# File 'lib/joint/io.rb', line 5

def content
  @content
end

#nameObject Also known as: path

Returns the value of attribute name.



5
6
7
# File 'lib/joint/io.rb', line 5

def name
  @name
end

#sizeObject

Returns the value of attribute size.



5
6
7
# File 'lib/joint/io.rb', line 5

def size
  @size
end

#typeObject

Returns the value of attribute type.



5
6
7
# File 'lib/joint/io.rb', line 5

def type
  @type
end

Instance Method Details

#read(*args) ⇒ Object



17
18
19
# File 'lib/joint/io.rb', line 17

def read(*args)
  @io.read(*args)
end