Sha256: 61e24c8c37ad3cad59c4e69235566a3ebe6fc2620834c9537d561e75bf6962a4

Contents?: true

Size: 598 Bytes

Versions: 6

Compression:

Stored size: 598 Bytes

Contents

module CukeModeler

  # NOT A PART OF THE PUBLIC API
  # A mix-in module containing methods used by models that represent an element that has a description.

  module Described

    # The description of the element
    attr_accessor :description


    private


    def description_output_string
      text = ''

      unless description.empty?
        description_lines = description.split("\n")

        text << "\n" if description_lines.first =~ /\S/
        text << description_lines.collect { |line| "#{line}" }.join("\n")
      end

      text
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cuke_modeler-3.3.0 lib/cuke_modeler/described.rb
cuke_modeler-3.2.0 lib/cuke_modeler/described.rb
cuke_modeler-3.1.0 lib/cuke_modeler/described.rb
cuke_modeler-3.0.0 lib/cuke_modeler/described.rb
cuke_modeler-2.1.0 lib/cuke_modeler/described.rb
cuke_modeler-2.0.0 lib/cuke_modeler/described.rb