Class: Vedeu::Buffers::Null

Inherits:
Object
  • Object
show all
Defined in:
lib/vedeu/buffers/null.rb

Overview

Provides a non-existent Vedeu::Buffers::Buffer that acts like the real thing, but does nothing.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Vedeu::Buffers::Null

Returns a new instance of Vedeu::Buffers::Null.

Options Hash (attributes):

  • name (String|NilClass)


19
20
21
22
# File 'lib/vedeu/buffers/null.rb', line 19

def initialize(attributes = {})
  @attributes = attributes
  @name       = @attributes[:name]
end

Instance Attribute Details

#nameString (readonly)



12
13
14
# File 'lib/vedeu/buffers/null.rb', line 12

def name
  @name
end

Instance Method Details

#nullNilClass Also known as: add, clear, hide, render, show, toggle



25
26
27
# File 'lib/vedeu/buffers/null.rb', line 25

def null(*)
  nil
end

#null?Boolean



36
37
38
# File 'lib/vedeu/buffers/null.rb', line 36

def null?
  true
end