Sha256: dcb7205a119a8db77ef7fb7d2c13783c30f8478c43fb81f724e2b5a0295d73e8

Contents?: true

Size: 1020 Bytes

Versions: 5

Compression:

Stored size: 1020 Bytes

Contents

# TODO: missing license header.


# possibly dead code. to revive, move SearchHelper to the Merb namespace.

# module Merb
#   module ChefServerWebui
#     module SearchHelper
#       def output_path(attributes)
#         res = Hash.new
#         attributes.each do |path|
#           parts = path.split("/")
#           unless parts[0].nil?
#             parts.shift if parts[0].length == 0
#           end
#           res[path] = ohai_walk(parts)
#         end
#         res
#       end
#       
#       def ohai_walk(path)
#         unless path[0]
#           @@ohai.to_json
#         else
#           ohai_walk_r(@@ohai, path)
#         end
#       end
#           
#       def ohai_walk_r(ohai, path)
#         hop = (ohai.is_a?(Array) ? path.shift.to_i : path.shift)
#         if ohai[hop]
#           if path[0]
#             ohai_walk_r(ohai[hop], path)
#           else
#             ohai[hop].to_json
#           end
#         else
#           nil
#         end
#       end
#     end
#   end  
# end # Merb
# 

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
chef-server-webui-0.9.18 app/helpers/search_helper.rb
chef-server-webui-0.9.16 app/helpers/search_helper.rb
chef-server-webui-0.9.14 app/helpers/search_helper.rb
chef-server-webui-0.9.14.rc.1 app/helpers/search_helper.rb
chef-server-webui-0.9.14.beta.1 app/helpers/search_helper.rb