Sha256: f3e9d08147ec619e6791dffd1d78785ab326aa7bca07bddf368fa5c109e97188

Contents?: true

Size: 683 Bytes

Versions: 3

Compression:

Stored size: 683 Bytes

Contents

# frozen_string_literal: true

require_relative "expect"
require_relative "getset"
require_relative "run"

module ReadmeDSL
  def readme(text)
    if @action[:target].nil?
      @current[:readme] << text # It's a group readme
    else
      @action[:readme] << text # It's a target readme
    end
  end

  def target(desc, args = {})
    previous_host = @action[:host]
    @action = {target: desc, host: previous_host, readme: []}
    weight = 1.0
    weight = args[:weight].to_f if args[:weight]
    @action[:weight] = weight
  end
  alias_method :goal, :target

  def unique(_key, _value)
    # Nothing to do
  end

  def log(text = "", type = :info)
    # Nothing to do
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
teuton-2.9.2 lib/teuton/readme/dsl/all.rb
teuton-2.9.1 lib/teuton/readme/dsl/all.rb
teuton-2.9.0 lib/teuton/readme/dsl/all.rb