Class Array
In: lib/uttk/logger/path.rb
lib/uttk/logger/to_uttk_log.rb
lib/uttk/loaders/Loader.rb
Parent: Object

Methods

Public Instance methods

[Source]

# File lib/uttk/loaders/Loader.rb, line 167
  def testify ( symtbl, &block )
    raise ArgumentError, "nil symtbl" if symtbl.nil?
    Uttk::Strategies::Suite.new do |t|
      t.symtbl = symtbl
      t.name = symtbl[:suite_name]
      t.wclass = symtbl[:wclass]
      t.attributes = symtbl[:attributes]
      t.symbols = symtbl[:symbols]
      t.contents = self
      block[t] if block
    end
  end

[Source]

# File lib/uttk/logger/path.rb, line 190
  def to_logger_path
    obj = Uttk::Logger::Path.new
    each do |x|
      if x.is_a? Array
        obj << Uttk::Logger::Segment.new(*x)
      else
        obj << x
      end
    end
    obj
  end

WARNING: Do not implement Array#to_uttk_log it doesn‘t make sense.

[Source]

# File lib/uttk/logger/to_uttk_log.rb, line 70
        def to_uttk_log_with_key ( key, log )
          unless ! empty? and all? { |x| x.is_a? Hash and x.size == 1 }
            return super
          end

          log.new_node key, :ordered => true do
            each do |x|
              k, v = x.to_a.first
              log[k] = v
            end
          end
        end

[Validate]