Class: Unisec::CLI::Commands::Confusables::List — Documentation by YARD 0.9.44

# Class: Unisec::CLI::Commands::Confusables::List

Inherits:
  Dry::CLI::Command
  - Object
  - Dry::CLI::Command
  - Unisec::CLI::Commands::Confusables::List
  show all

Defined in:
  lib/unisec/cli/confusables.rb

## Overview

Command `unisec confusables list`

Example:

    $ unisec confusables list '!'
    U+FF01    ！    FULLWIDTH EXCLAMATION MARK
    U+01C3    ǃ    LATIN LETTER RETROFLEX CLICK
    …

## Instance Method Summary collapse

- #call(character: nil, **options) ⇒ Object

  List confusables characters for a given character.

## Instance Method Details

### #call(character: nil, **options) ⇒ `Object`

List confusables characters for a given character

Parameters:

- character (`String`) (defaults to: `nil`) —

  the character to search confusables for

- options (`Hash`) —

  a customizable set of options

Options Hash (`**options`):

- :map (`Boolean`) —

  allows partial mapping, includes confusable where the given chart is a
  part of

    33
    34
    35
    36
    # File 'lib/unisec/cli/confusables.rb', line 33

    def call(character: nil, **options)
      to_bool = ->(str) { ['true', true].include?(str) }
      Unisec::Confusables.list_display(character, map: to_bool.call(options.fetch(:map)))
    end