Class: KUtil::ConsoleHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/k_util/console_helper.rb

Overview

Helper methods attached to the namespace for working with Console

Instance Method Summary collapse

Instance Method Details

Convert a hash into a deep OpenStruct or array an array of objects into an array of OpenStruct Generate hyper link encoded string for the console



14
15
16
# File 'lib/k_util/console_helper.rb', line 14

def file_hyperlink(text, file)
  "\u001b]8;;file://#{file}\u0007#{text}\u001b]8;;\u0007"
end


18
19
20
# File 'lib/k_util/console_helper.rb', line 18

def hyperlink(text, link)
  "\u001b]8;;#{link}\u0007#{text}\u001b]8;;\u0007"
end