Sha256: 66c7e63c068162fcd27b639147057904afda8a5b7b5115ed3778aadf7f68352d

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

module Vedeu
  module Buffer
    module Formatting
      include Virtus.module

      attribute :style,      Vedeu::Buffer::Style
      attribute :foreground, Symbol
      attribute :background, Symbol

      private

      def colour
        if foreground && background
          [foreground, background]
        elsif foreground.nil? || background.nil?
          []
        end
      end

      def styles
        if style
          style
        elsif style.nil?
          []
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vedeu-0.0.23 lib/vedeu/output/buffer/formatting.rb