Class: KUtil::ConsoleHelper
- Inherits:
-
Object
- Object
- KUtil::ConsoleHelper
- Defined in:
- lib/k_util/console_helper.rb
Overview
Helper methods attached to the namespace for working with Console
Instance Method Summary collapse
-
#file_hyperlink(text, file) ⇒ Object
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.
- #hyperlink(text, link) ⇒ Object
Instance Method Details
#file_hyperlink(text, file) ⇒ Object
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 |
#hyperlink(text, link) ⇒ Object
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 |