Sha256: c818b29cde09d3e043f99f61d822e69afc40819930d39ad911891f906e44e209

Contents?: true

Size: 444 Bytes

Versions: 1

Compression:

Stored size: 444 Bytes

Contents

module Kernel
  def lumos(message = nil, *args)
    if message.nil? || message == :>
      lumos_divide args[0], args[1]
    else
      lumos_wrap message, args[0]
    end
  end

private

  def lumos_divide(delimiter, iterations)
    delimiter  ||= "#"
    iterations ||= 3

    print delimiter * iterations.to_i
  end

  def lumos_wrap(message = nil, options)
    options ||= {}
    print Lumos::Wrapper.new(message, options).result
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lumos-0.0.1 lib/lumos/core_ext/kernel.rb