Sha256: c4bfb4d6d11f51d9d92224629c0cb109e227c7a834744cf9acb97deb2a54bf4b

Contents?: true

Size: 460 Bytes

Versions: 8

Compression:

Stored size: 460 Bytes

Contents

# encoding: utf-8

require_relative 'converter_registry'

module TTY
  class Prompt
    module ConverterDSL
      def converter_registry
        @converter_registry ||= ConverterRegistry.new
      end

      def converter(name, &block)
        @converter_registry = converter_registry.register(name, &block)
        self
      end

      def convert(name, data)
        @converter_registry[name, data]
      end
    end # ConverterDSL
  end # Prompt
end # TTY

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
tty-prompt-0.15.0 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.14.0 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.13.2 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.13.1 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.13.0 lib/tty/prompt/converter_dsl.rb
austb-tty-prompt-0.13.0 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.12.0 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.11.0 lib/tty/prompt/converter_dsl.rb