Here just i pass the ID through command line ie ruby newrest.rb id=“22”.
I don’t see in the code where the method retrieve is called, so I
would not expect ruby newrest.rb to do anything.
Also I don’t see how the command line value id is being loaded into
$param. Normally for ruby command line args I use ARGV or
OptionParser. Google for ruby command line parameters and you will
find how to do it.
Here just i pass the ID through command line ie ruby newrest.rb
id=“22”.
I don’t see in the code where the method retrieve is called, so I would
not expect ruby newrest.rb to do anything.Also I don’t see how the
command
line value id is being loaded into$param. Normally for ruby command
line
args I use ARGV orOptionParser. Google for ruby command line parameters
and you will find how to do it.
Colin
I got it through the ARGV…
Thankyou
vishnu
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.