gardner.rb: Add debug options and information
This commit is contained in:
parent
4b33abcd75
commit
03d09105f3
1 changed files with 4 additions and 2 deletions
|
@ -48,8 +48,10 @@ module Gardner
|
||||||
# Format and display the trunk
|
# Format and display the trunk
|
||||||
#
|
#
|
||||||
# @param trunk [Hash] The trunk hash
|
# @param trunk [Hash] The trunk hash
|
||||||
def self.display_trunk(trunk)
|
# @param debug [Boolean] The status of showing debug information
|
||||||
|
def self.display_trunk(trunk, debug=false)
|
||||||
40.times { print "-" }
|
40.times { print "-" }
|
||||||
|
puts "\n[ Trunk ]\n" if debug
|
||||||
puts "\n#{trunk["trunk"]}"
|
puts "\n#{trunk["trunk"]}"
|
||||||
40.times { print "-" }
|
40.times { print "-" }
|
||||||
puts "\n"
|
puts "\n"
|
||||||
|
@ -60,7 +62,7 @@ module Gardner
|
||||||
# @param branch [Hash] A branch data set
|
# @param branch [Hash] A branch data set
|
||||||
# @param branch_no [Integer] The branch number
|
# @param branch_no [Integer] The branch number
|
||||||
# @param debug [Boolean] Status of showing debug information
|
# @param debug [Boolean] Status of showing debug information
|
||||||
def self.display_branch(branch, branch_no, debug)
|
def self.display_branch(branch, branch_no, debug=false)
|
||||||
puts "\n[ Branch: #{branch_no} ]" if debug
|
puts "\n[ Branch: #{branch_no} ]" if debug
|
||||||
puts "\n#{branch["desc"]}\n\n"
|
puts "\n#{branch["desc"]}\n\n"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue