module ErrbitTracPlugin
Constants
- VERSION
Public Class Methods
pretty_hash(hash, nesting = 0)
click to toggle source
# File lib/errbit_trac_plugin.rb, line 11 def self.pretty_hash(hash, nesting = 0) tab_size = 2 nesting += 1 pretty = "{" sorted_keys = hash.keys.sort sorted_keys.each do |key| val = hash[key].is_a?(Hash) ? pretty_hash(hash[key], nesting) : hash[key].inspect pretty += "\n#{' '*nesting*tab_size}" pretty += "#{key.inspect} => #{val}" pretty += "," unless key == sorted_keys.last end nesting -= 1 pretty += "\n#{' '*nesting*tab_size}}" end
root()
click to toggle source
# File lib/errbit_trac_plugin.rb, line 7 def self.root File.expand_path '../..', __FILE__ end