Sha256: b8e4ecd45a02774053577206a4b0265300cf4da41dede1d879b8e7d3542c4558

Contents?: true

Size: 472 Bytes

Versions: 10

Compression:

Stored size: 472 Bytes

Contents

# frozen_string_literal: true

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

10 entries across 10 versions & 2 rubygems

Version Path
pokedex-terminal-0.2.8 vendor/bundle/ruby/2.7.0/gems/tty-prompt-0.21.0/lib/tty/prompt/converter_dsl.rb
pokedex-terminal-0.2.7 vendor/bundle/ruby/2.7.0/gems/tty-prompt-0.21.0/lib/tty/prompt/converter_dsl.rb
pokedex-terminal-0.2.6 vendor/bundle/ruby/2.7.0/gems/tty-prompt-0.21.0/lib/tty/prompt/converter_dsl.rb
pokedex-terminal-0.2.5 vendor/bundle/ruby/2.7.0/gems/tty-prompt-0.21.0/lib/tty/prompt/converter_dsl.rb
pokedex-terminal-0.2.4 vendor/bundle/ruby/2.7.0/gems/tty-prompt-0.21.0/lib/tty/prompt/converter_dsl.rb
tty-prompt-0.21.0 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.20.0 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.19.0 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.18.1 lib/tty/prompt/converter_dsl.rb
tty-prompt-0.18.0 lib/tty/prompt/converter_dsl.rb