2007/7/26, Alvaro Perez <alvaro.pmartinez / gmail.com>:
>
> I have an Array with two Target objects. How can I manage to take each
> value of the objects?
>
>
>   p("targets size: " + @targets.length.to_s) # "targets size: 2" (OK)
>
>   p @targets      # [#<Target:0x471c2f4
> @attributes={"hit_sequence_desc"=>"0",
>                   # "hit_sequence_ID"=>"1
>                   # ", "hit_sequence_accession"=>"0"}>,
> #<Target:0x471c290
>                   # @attributes={"hit_sequenc
>                   # e_desc"=>"3", "hit_sequence_ID"=>"3",
>                   # "hit_sequence_accession"=>"3"}>] (OK)
>
>   p @targets[0].attribute_names # ["hit_sequence_ID",
> "hit_sequence_accession",
>                                 #"hit_sequence_desc"] (OK)
>   p @targets[0].class # Target (OK)
>
>
>   Now it comes the problem:
>
>
>   p @targets[0].hit_sequence_ID # nil (???)
>
>   p @targets[0].hit_sequence_desc # nil (???)
>
>   p @targets[0].hit_sequence_accession # nil (???)

Dunno your class but you probably want to try this

p @targets[0].attributes["hit_sequence_ID"]

robert