Sha256: c5abd514cfce811376b2d830ec6ed5df7bf5c0ba2212b47f810476fd8dd6e5ec

Contents?: true

Size: 717 Bytes

Versions: 6

Compression:

Stored size: 717 Bytes

Contents

# frozen_string_literal: true

module Vedeu

  module Cells

    # Provides the character/escape sequence to draw one cell of a
    # with a custom value, colour and style.
    #
    # The Vedeu::Cells::Char object represents an alpha-numeric
    # character.
    #
    # @api private
    #
    class Char < Vedeu::Cells::Empty

      # @return [String]
      def as_html
        if present?(value)
          value

        else
          super

        end
      end

      # @return [Boolean]
      def cell?
        false
      end

      # @return [String]
      def text
        @value || ' '
      end

      # @return [Symbol]
      def type
        :char
      end

    end # Char

  end # Cells

end # Vedeu

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
vedeu-0.8.8 lib/vedeu/cells/char.rb
vedeu-0.8.7 lib/vedeu/cells/char.rb
vedeu-0.8.6 lib/vedeu/cells/char.rb
vedeu-0.8.5 lib/vedeu/cells/char.rb
vedeu-0.8.4 lib/vedeu/cells/char.rb
vedeu-0.8.3 lib/vedeu/cells/char.rb