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?

1 Reply

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

item["linode_type"] = item["TYPE"] unless item["TYPE"].nil?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct