Class: Unisec::CLI::Commands::Blocks::Search
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- Unisec::CLI::Commands::Blocks::Search
- 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
57 58 59 60 |
# File 'lib/unisec/cli/blocks.rb', line 57 def call(block_arg: nil, **) 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: [:with_count].to_bool) end |