Sha256: 196c0824ead10372e555bc2d165a4f6e49b956e5145174a1adbef140998228e1

Contents?: true

Size: 928 Bytes

Versions: 15

Compression:

Stored size: 928 Bytes

Contents

module Vedeu

  module Null

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

      # @!attribute [r] name
      # @return [String]
      attr_reader :name

      # Returns a new instance of Vedeu::Null::Buffer.
      #
      # @param attributes [Hash<Symbol => void>]
      # @option attributes name [String|NilClass]
      # @return [Vedeu::Null::Buffer]
      def initialize(attributes = {})
        @attributes = attributes
        @name       = @attributes[:name]
      end

      # @return [NilClass]
      def null(*)
        nil
      end
      alias_method :add, :null
      alias_method :clear, :null
      alias_method :hide, :null
      alias_method :render, :null
      alias_method :show, :null
      alias_method :toggle, :null

      # @return [Boolean]
      def null?
        true
      end

    end # Buffer

  end # Null

end # Vedeu

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
vedeu-0.6.4 lib/vedeu/null/buffer.rb
vedeu-0.6.3 lib/vedeu/null/buffer.rb
vedeu-0.6.2 lib/vedeu/null/buffer.rb
vedeu-0.6.1 lib/vedeu/null/buffer.rb
vedeu-0.6.0 lib/vedeu/null/buffer.rb
vedeu-0.5.13 lib/vedeu/null/buffer.rb
vedeu-0.5.12 lib/vedeu/null/buffer.rb
vedeu-0.5.11 lib/vedeu/null/buffer.rb
vedeu-0.5.10 lib/vedeu/null/buffer.rb
vedeu-0.5.9 lib/vedeu/null/buffer.rb
vedeu-0.5.8 lib/vedeu/null/buffer.rb
vedeu-0.5.7 lib/vedeu/null/buffer.rb
vedeu-0.5.6 lib/vedeu/null/buffer.rb
vedeu-0.5.5 lib/vedeu/null/buffer.rb
vedeu-0.5.4 lib/vedeu/null/buffer.rb