Module: Defcli

Defined in:
lib/defcli.rb,
lib/defcli/formatting.rb

Defined Under Namespace

Modules: Formatting

Class Method Summary collapse

Class Method Details

.format_results(results, color = true) ⇒ String

Format results for output

Parameters:

  • results (Array)

    array of results

  • color (Boolean) (defaults to: true)

    colored output

Returns:

  • (String)


19
20
21
# File 'lib/defcli.rb', line 19

def format_results(results, color = true)
  Defcli::Formatting.format_results(results, color)
end

.open_in_browser(url) ⇒ Object



27
28
29
# File 'lib/defcli.rb', line 27

def open_in_browser(url)
  system open_cmd, url
end

.read_url(url) ⇒ Object



23
24
25
# File 'lib/defcli.rb', line 23

def read_url(url)
  OpenURI.open_uri(url).read
end

.versionObject



11
12
13
# File 'lib/defcli.rb', line 11

def version
  "0.0.1"
end