module Grimoire

Constants

DEPENDENCY_CLASS

Class used to define dependency information

REQUIREMENT_CLASS

Class used to define requirement

VERSION

Current library version

VERSION_CLASS

Class used to define version information

Attributes

ui[R]

@return [Bogo::Ui]

Public Class Methods

debug(*args) { || ... } click to toggle source

Write debug message

# File lib/grimoire.rb, line 41
def debug(*args)
  if(ui)
    if(block_given?)
      args.push(yield)
    end
    ui.debug(*args)
  end
end
ui=(ui) click to toggle source

Set Ui instance

@param ui [Bogo::Ui] @return [Bogo::Ui]

# File lib/grimoire.rb, line 32
def ui=(ui)
  unless(ui.respond_to?(:debug))
    raise TypeError.new "Expecting type `Bogo::Ui` but received `#{ui.class}`"
  end
  @ui = ui
end