Class: Unisec::CLI::Commands::Dump::Codepoints::Standard

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

Overview

CLI command unisec dump codepoints standard.

Example:

$ unisec dump codepoints standard "unicode"
U+0075 U+006E U+0069 U+0063 U+006F U+0064 U+0065

Instance Method Summary collapse

Instance Method Details

#call(input: nil) ⇒ Object

Code point dump (standard format).

Parameters:

  • input (String) (defaults to: nil)

    Input string to encode



102
103
104
105
# File 'lib/unisec/cli/dump.rb', line 102

def call(input: nil)
  input = $stdin.read.chomp if input == '-'
  puts Unisec::Utils::String.chars2codepoints(input)
end