Sha256: 96235b33f1f66f1962ba3232dea3da75c581c6930813ccd74f20d76a5e378a2d

Contents?: true

Size: 454 Bytes

Versions: 31

Compression:

Stored size: 454 Bytes

Contents

module HammerCLI
  module Help
    class Text < AbstractItem
      def initialize(text = nil, options = {})
        super(options)
        build_definition(text)
      end

      def build_string
        text = @text
        text = HighLine.color(@text, :bold) if @richtext
        text
      end

      protected

      def build_definition(content)
        @text = content || ''
        @definition = Definition.new([self])
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
hammer_cli-3.13.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.12.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.10.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.9.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.8.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.7.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.5.1 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.6.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.5.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.4.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.3.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.2.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.1.1 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.0.2 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.1.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.0.1 lib/hammer_cli/help/definition/text.rb
hammer_cli-3.0.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-2.5.1 lib/hammer_cli/help/definition/text.rb
hammer_cli-2.5.0 lib/hammer_cli/help/definition/text.rb
hammer_cli-2.3.1 lib/hammer_cli/help/definition/text.rb