class Superhosting::Cli::Cmd::ModelTree
Public Class Methods
after_action(data, config)
click to toggle source
# File lib/superhosting/cli/cmd/model_tree.rb, line 10 def after_action(data, config) def show_tree(node, type='model') node.each do |k, hash| self.info("#{"#{type}: " if type == 'mux'}#{k.name}") self.indent_step %w(mux model).each do |type| (hash[type] || []).each {|v| show_tree(v, type) } if !hash[type].nil? and !hash[type].empty? end self.indent_step_back end end old = self.indent show_tree(data) self.indent = old end
has_required_param?()
click to toggle source
# File lib/superhosting/cli/cmd/model_tree.rb, line 6 def has_required_param? true end
show_tree(node, type='model')
click to toggle source
# File lib/superhosting/cli/cmd/model_tree.rb, line 11 def show_tree(node, type='model') node.each do |k, hash| self.info("#{"#{type}: " if type == 'mux'}#{k.name}") self.indent_step %w(mux model).each do |type| (hash[type] || []).each {|v| show_tree(v, type) } if !hash[type].nil? and !hash[type].empty? end self.indent_step_back end end