Class: Unisec::CLI::Commands::Size

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

Overview

CLI command ‘unisec size` for the class Size from the lib.

Example:

“‘plaintext $ unisec size 🧑🏼‍🔬Code point(s): 4 Grapheme(s): 1 UTF-8 byte(s): 15 UTF-16 byte(s): 14 UTF-32 byte(s): 16 UTF-8 unit(s): 15 UTF-16 unit(s): 7 UTF-32 unit(s): 4 “`

Instance Method Summary collapse

Instance Method Details

#call(input: nil) ⇒ Object

All kinf of size information about a Unicode string.

Parameters:

  • input (String) (defaults to: nil)

    Input sting we want to know the size of



32
33
34
# File 'lib/unisec/cli/size.rb', line 32

def call(input: nil, **)
  puts Unisec::Size.new(input).display
end