Class: Unisec::CLI::Commands::Blocks::Search — Documentation by YARD 0.9.44

# Class: Unisec::CLI::Commands::Blocks::Search

Inherits:
  Dry::CLI::Command
  - Object
  - Dry::CLI::Command
  - Unisec::CLI::Commands::Blocks::Search
  show all

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

## Overview

Command `unisec blocks search`

Example:

    $ unisec blocks search 127745
    $ unisec blocks search U+1f4a9
    $ unisec blocks search …
    $ unisec blocks search javanese

## Instance Method Summary collapse

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

  Display a block matching a decimal code point, standardized hexadecimal codepoint, string character or block name.

## Instance Method Details

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

Display a block matching a decimal code point, standardized hexadecimal codepoint, string character or block name

Parameters:

- block_arg (`Integer|String`) (defaults to: `nil`) —

  Decimal code point or standardized hexadecimal codepoint or string character (only one, so be careful with emojis, composed or joint characters using several units) or directly look for the block name (case insensitive).

    57
    58
    59
    60
    # File 'lib/unisec/cli/blocks.rb', line 57

    def call(block_arg: nil, **options)
      block_arg = block_arg.to_i if /\A\d+\Z/.match?(block_arg) # cast decimal string to integer
      Unisec::Blocks.block_display(block_arg, with_count: options[:with_count].to_bool)
    end