Class: Array
- Defined in:
- lib/uttk/logger/path.rb,
lib/uttk/loaders/Loader.rb,
lib/uttk/logger/to_uttk_log.rb
Instance Method Summary collapse
- #testify(symtbl, &block) ⇒ Object
- #to_logger_path ⇒ Object
-
#to_uttk_log_with_key(key, log) ⇒ Object
WARNING: Do not implement Array#to_uttk_log it doesn’t make sense.
Instance Method Details
#testify(symtbl, &block) ⇒ Object
167 168 169 170 171 172 173 174 175 176 177 178 |
# 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 |
#to_logger_path ⇒ Object
190 191 192 193 194 195 196 197 198 199 200 |
# 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 |
#to_uttk_log_with_key(key, log) ⇒ Object
WARNING: Do not implement Array#to_uttk_log it doesn’t make sense.
70 71 72 73 74 75 76 77 78 79 80 81 |
# 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 |