Class: Unisec::CLI::Commands::Surrogates::To

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

Overview

Command ‘unisec surrogates to`

Example:

“‘plaintext

$ unisec surrogates to 0x1F4A9
Char: 

“‘

Instance Method Summary collapse

Instance Method Details

#call(codepoint: nil) ⇒ Object

Calculate the surrogates based on the Unicode code point.

Parameters:

  • codepoint (String) (defaults to: nil)

    decimal codepoint



60
61
62
# File 'lib/unisec/cli/surrogates.rb', line 60

def call(codepoint: nil, **)
  puts Unisec::Surrogates.new(Unisec::Utils::String.convert(codepoint, :integer)).display
end