Class: Unisec::CLI::Commands::Properties::Char

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/unisec/cli/properties.rb

Overview

Command unisec properties char

Example:

$ unisec properties char é
Name:               LATIN SMALL LETTER E WITH ACUTE
Code Point:         U+00E9

Block:              Latin-1 Supplement
…

Instance Method Summary collapse

Instance Method Details

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

Returns all properties of a given Unicode character (code point as string)

Parameters:

  • character (String) (defaults to: nil)

    Unicode code point (as character / string)

  • options (Hash)

    a customizable set of options

Options Hash (**options):

  • :extended (Boolean)

    Show all properties



76
77
78
79
# File 'lib/unisec/cli/properties.rb', line 76

def call(character: nil, **options)
  to_bool = ->(str) { str == 'true' }
  Unisec::Properties.char_display(character, extended: to_bool.call(options.fetch(:extended)))
end