Sebastian Hungerecker
4/16/2009 8:43:00 PM
Jeff Leeman wrote:
> Well, what I'm looking for is to be able run something like:
>
> ruby script/runner "SomeClassName.method_name({:some_key_1 =>
> 'some_value_1', :some_key_2 => 'some_value_2', :some_key_3 =>
> 'some_value_3'})"
You're perfectly able to run something like that. See:
~> mkdir script
~> cat>script/runner
class SomeClassName
def self.method_name(hash)
p hash
end
end
eval ARGV[0]
~> ruby script/runner "SomeClassName.method_name({:some_key_1
=> 'some_value_1', :some_key_2 => 'some_value_2', :some_key_3
=> 'some_value_3'})"
{:some_key_1=>"some_value_1", :some_key_2=>"some_value_2", :some_key_3=>"some_value_3"}
HTH,
Sebastian