class TextOutput
Public Instance Methods
out(hash)
click to toggle source
# File lib/outputs.rb, line 2 def out(hash) hash.each_pair do |k,v| print(k, k, v) if v != nil end end
print(parent_key, k, v)
click to toggle source
# File lib/outputs.rb, line 8 def print(parent_key, k, v) if v.is_a?(Hash) print_hash(k, v) else puts k + ": " + v.to_s end end
print_hash(parent_key, hash)
click to toggle source
# File lib/outputs.rb, line 16 def print_hash(parent_key, hash) hash.each_pair do |k,v| print parent_key + "." + k, k, v if v != nil end end