Linode Forum Index Linode Forum
Linode Community Forums
 


Ruby, Linode API & OpenStruct

Click here to go to the original topic

 
       Linode Forum Index -> General Discussion
Author Message
jkinsell



Joined: 15 Feb 2010
Posts: 8

Posted: Sat Feb 20, 2010 7:31 pm    Post subject: Ruby, Linode API & OpenStruct  

I'm just taking my first look at the Ruby gem for the Linode API in order to write some rake tasks. It looks like the data is stored in an OpenStruct - but unfortunately seems to overload the use of the attribute type (which returns the class for the object, not the data). I'm sure I could just modify the code - but I must not be the first person hitting this. Right?
Back to top  
jkinsell



Joined: 15 Feb 2010
Posts: 8

Posted: Sat Feb 20, 2010 7:58 pm    Post subject:  

For now I hacked the below line into the convert_item method of linode.rb:

item["linode_type"] = item["TYPE"] unless item["TYPE"].nil?
Back to top  
 
       Linode Forum Index -> General Discussion
Page 1 of 1