Class: Vigilem::Core::DefaultBuffer
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Vigilem::Core::DefaultBuffer
- Includes:
- Buffer
- Defined in:
- lib/vigilem/core/default_buffer.rb
Class Method Summary collapse
-
.wrap(type) ⇒ DefaultBuffer
like new except type is not optional and passes through an object that is already of self type.
Instance Method Summary collapse
- #==(other_obj) ⇒ TrueClass || FalseClass
-
#initialize(type = []) ⇒ DefaultBuffer
constructor
A new instance of DefaultBuffer.
- #inspect ⇒ String
Methods included from Buffer
#concat, #deep_dup, #empty?, new, #offset, #offset!, #peek, #pop, #shift, #slice, #slice!
Constructor Details
#initialize(type = []) ⇒ DefaultBuffer
Returns a new instance of DefaultBuffer.
13 14 15 |
# File 'lib/vigilem/core/default_buffer.rb', line 13 def initialize(type=[]) super(type) end |
Class Method Details
.wrap(type) ⇒ DefaultBuffer
like new except type is not optional and passes through an object that is already of self type
22 23 24 25 26 27 28 |
# File 'lib/vigilem/core/default_buffer.rb', line 22 def self.wrap(type) if type.is_a? self type else new(type) end end |
Instance Method Details
#==(other_obj) ⇒ TrueClass || FalseClass
33 34 35 36 |
# File 'lib/vigilem/core/default_buffer.rb', line 33 def ==(other_obj) super(other_obj) || __getobj__ == other_obj.respond.__getobj__ end |
#inspect ⇒ String
40 41 42 |
# File 'lib/vigilem/core/default_buffer.rb', line 40 def inspect "#<#{self.class}:0x#{object_id} #{super}>" end |