Class: TridentAssistant::CLI::Utils

Inherits:
Base
  • Object
show all
Defined in:
lib/trident_assistant/cli/utils.rb

Overview

CLI for utils

Constant Summary

Constants inherited from Base

Base::UI

Instance Attribute Summary

Attributes inherited from Base

#api, #bot, #client, #keystore

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from TridentAssistant::CLI::Base

Instance Method Details

#hash(_input) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/trident_assistant/cli/utils.rb', line 11

def hash(_input)
  content =
    if options[:file]
      File.read options[:input]
    else
      options[:input].to_s
    end

  log SHA3::Digest::SHA256.hexdigest(content)
end