Class: Izokatu::FunctionImporter

Inherits:
Object
  • Object
show all
Extended by:
Callable
Includes:
Contracts, Helpers
Defined in:
lib/izokatu/importer/function_importer.rb

Overview

Izokatu importer for importing data from some function, via :data param

Constant Summary

Constants included from Helpers

Helpers::EC_CIPHER, Helpers::KEY_SYMBOL, Helpers::RBNACL_KEY_CLASSES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Callable

call

Methods included from Helpers

#decode_data, #encode_data, #export_data, #export_decrypted!, #export_encrypted!, #generate_ec_keypair, #generate_rbnacl_keypair, #generate_rsa_keypair, #import_data, #import_encrypted!, #import_encrypted_in_options!

Constructor Details

#initialize(data:, decode:) ⇒ FunctionImporter

Initializing options for import

Parameters:

  • data (#data)
  • decode (TrueClass || FalseClass)

    Enable/disable decoding of imported data

Since:

  • 0.1.0



22
23
24
# File 'lib/izokatu/importer/function_importer.rb', line 22

def initialize(data:, decode:)
  @data = decode ? decode_data(data) : data
end

Instance Attribute Details

#dataString (readonly)

Returns data for import.

Returns:

  • (String)

    data for import



12
13
14
# File 'lib/izokatu/importer/function_importer.rb', line 12

def data
  @data
end

Instance Method Details

#performHash

Performing import of data

Returns:

  • (Hash)

    imported data

Since:

  • 0.1.0



32
33
34
# File 'lib/izokatu/importer/function_importer.rb', line 32

def perform
  data
end