Class: NamedBuffer

Inherits:
StringIO
  • Object
show all
Defined in:
lib/machines/named_buffer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, string) ⇒ NamedBuffer

Returns a new instance of NamedBuffer.



4
5
6
7
# File 'lib/machines/named_buffer.rb', line 4

def initialize name, string
  super string
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



2
3
4
# File 'lib/machines/named_buffer.rb', line 2

def name
  @name
end