Comment/Devbug traverser ruby Script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Comment/Devbug traverser ruby Script
# 1  
Old 10-21-2011
Comment/Devbug traverser ruby Script

Hello all,
i need some help, having never herd of ruby before i joined my workplace im now saddled with alot of scripts written in ruby and i need to find out how to debug certain things (values of array's hashes etc). What i need is how to view each step in this command in a log file:

traverser.proc_node(proc_tree, 'root', Hash.new, Hash.new, verify_action.method(:Run), 0, 1, @loadset_hash)


do i do something like:
Log(LogLevels.normal, traverser.proc_node(proc_tree, 'root', Hash.new, Hash.new, verify_action.method(:Run), 0, 1, @loadset_hash) )??? Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Create a file with comment in script

Hello, Be indulgent for my english. Can you help me ? function f1 { } egrep -v '^#' list_file \ | while read arg1 arg2 arg3 arg4; do f1 $arg1 $arg2 $arg3 $arg4 done In list_file there is I want to replace list_file by a $var then when i launch the script with a file's... (13 Replies)
Discussion started by: amazigh42
13 Replies

2. Web Development

Permission problems calling Ruby from php script

I'm just getting my feet wet with web development, so hopefully this is a simple thing I'm overlooking, but so far I'm stumped. I have a php script that calls Ruby via exec(). This works fine in my test environment, but when I moved it to my production environment I run into a permissions... (7 Replies)
Discussion started by: dantes990
7 Replies

3. Shell Programming and Scripting

Need to comment some code via script

Hi, I am writing a shell script, which should comment a if-fi loop in a file. From google i found that, we can use below qualifier to comment a section of code, :<<COMMENT COMMENT But i could not place these keywords before and after if-fi loop. Any help would be appreciated. Finally the... (2 Replies)
Discussion started by: successlin
2 Replies

4. UNIX for Dummies Questions & Answers

multiline comment in shell script

Is thery any way to give comment to multiple line without explicitly specifying # at the begining of each line ? (2 Replies)
Discussion started by: hiten.r.chauhan
2 Replies

5. Shell Programming and Scripting

How do I add grep into this ruby script?

I have this script that will increase my entered date, seven days. I need to add something to this script (i don't know how to do it) that will search a log file doing a word count for the words password and change and put that output to a file. then again for the next date and so on and so on. The... (0 Replies)
Discussion started by: bbraml
0 Replies

6. UNIX for Dummies Questions & Answers

Why do a unix script starts with a comment?

For eg: #!/usr/bin/ksh <remaining code goes here> .. .. Does the compiler ignores that? Thanks (2 Replies)
Discussion started by: ajincoep
2 Replies

7. Shell Programming and Scripting

best way for removing comment from ruby program

Hi all, I would want to remove all comments from my ruby/rails program. It may seem like a simple task, but it is not so. Because you need to have your tool implemented as like your language parser which is actually not so easy. And am in the search of it, to remove comment from ruby/rails.... (4 Replies)
Discussion started by: thegeek
4 Replies

8. Shell Programming and Scripting

Pls comment on my script.

Hi guys, hope you scripting gurus here can help me out, the logic in my script somehow not working the way it should, this script part of a bigger backup script suppose to do some checking on the cluster prior to bringing up the package on MC/SG after backend cloning operation, this portion is... (3 Replies)
Discussion started by: sparcguy
3 Replies

9. Programming

Needed help in a ruby script with user interaction involved!

Hi all, I am struck at this point and needed some help in ruby I wanted to write a script that accepts the no of VNICs the user wants to create and then ask for the name of each Vnic he wants then use these names to create the corresponding Vnics Eg: suppose that there are 2 Vnics to be... (0 Replies)
Discussion started by: wrapster
0 Replies

10. Shell Programming and Scripting

Block Comment in Shell script

how to put multiline comments in a shell script like /* Some code */ in C language? (3 Replies)
Discussion started by: skyineyes
3 Replies
Login or Register to Ask a Question
IRB(1)							 Ruby Programmer's Reference Guide						    IRB(1)

NAME
irb -- Interactive Ruby Shell SYNOPSIS
irb [--version] [-dfm] [-I directory] [-r library] [--[no]inspect] [--[no]readline] [--prompt mode] [--prompt-mode mode] [--inf-ruby-mode] [--simple-prompt] [--noprompt] [--tracer] [--back-trace-limit n] [--irb_debug n] [--] [program_file] [argument ...] DESCRIPTION
irb is the REPL(read-eval-print loop) environment for Ruby programs. OPTIONS
--version Prints the version of irb. -E external[:internal] --encoding external[:internal] Same as `ruby -E' . Specifies the default value(s) for external encodings and internal encoding. Values should be separated with colon (:). You can omit the one for internal encodings, then the value (Encoding.default_internal) will be nil. -I path Same as `ruby -I' . Specifies $LOAD_PATH directory -U Same as `ruby -U' . Sets the default value for internal encodings (Encoding.default_internal) to UTF-8. -d Same as `ruby -d' . Sets $DEBUG to true. -f Suppresses read of ~/.irbrc. -h --help Prints a summary of the options. -m Bc mode (load mathn, fraction or matrix are available) -r library Same as `ruby -r'. Causes irb to load the library using require. --inspect Uses `inspect' for output (default except for bc mode) --noinspect Doesn't use inspect for output --readline Uses Readline extension module. --noreadline Doesn't use Readline extension module. --prompt mode --prompt-mode mode Switch prompt mode. Pre-defined prompt modes are `default', `simple', `xmp' and `inf-ruby'. --inf-ruby-mode Uses prompt appropriate for inf-ruby-mode on emacs. Suppresses --readline. --simple-prompt Makes prompts simple. --noprompt No prompt mode. --tracer Displays trace for each execution of commands. --back-trace-limit n Displays backtrace top n and tail n. The default value is 16. --irb_debug n Sets internal debug level to n (not for popular use) ENVIRONMENT
IRBRC Also irb depends on same variables as ruby(1). FILES
~/.irbrc Personal irb initialization. EXAMPLES
% irb irb(main):001:0> 1 + 1 2 irb(main):002:0> def t(x) irb(main):003:1> x+1 irb(main):004:1> end => nil irb(main):005:0> t(3) => 4 irb(main):006:0> if t(3) == 4 irb(main):007:1> p :ok irb(main):008:1> end :ok => :ok irb(main):009:0> quit % SEE ALSO
ruby(1). REPORTING BUGS
o Security vulnerabilities should be reported via an email to security@ruby-lang.org. Reported problems will be published after being fixed. o Other bugs and feature requests can be reported via the Ruby Issue Tracking System (http://bugs.ruby-lang.org). Do not report security vulnerabilities via this system because it publishes the vulnerabilities immediately. AUTHORS
Written by Keiju ISHITSUKA. UNIX
November 15, 2012 UNIX