Class: Joint::IO
- Inherits:
-
Object
- Object
- Joint::IO
- Defined in:
- lib/joint/io.rb
Instance Attribute Summary collapse
-
#content ⇒ Object
Returns the value of attribute content.
-
#name ⇒ Object
(also: #path)
Returns the value of attribute name.
-
#size ⇒ Object
Returns the value of attribute size.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ IO
constructor
A new instance of IO.
- #read(*args) ⇒ Object
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
#content ⇒ Object
Returns the value of attribute content.
5 6 7 |
# File 'lib/joint/io.rb', line 5 def content @content end |
#name ⇒ Object Also known as: path
Returns the value of attribute name.
5 6 7 |
# File 'lib/joint/io.rb', line 5 def name @name end |
#size ⇒ Object
Returns the value of attribute size.
5 6 7 |
# File 'lib/joint/io.rb', line 5 def size @size end |
#type ⇒ Object
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 |