I've worked around this issue by concatting arrays, however, I think it is a bug that the following code throws an error:
> [[NetboxClientRuby::DCIM::Interface.new(name: 'ge-0/0/0', device_id: 488)]].flatten
NetboxClientRuby::LocalError: Received 'nil' while replacing ':id' in 'dcim/interfaces/:id.json' with a value.
from /usr/local/bundle/gems/netbox-client-ruby-0.5.2/lib/netbox_client_ruby/entity.rb:310:in `block in replace_path_variables_in'
The problem is Interface responds to flatten and throws an error:
> NetboxClientRuby::DCIM::Interface.new(name: 'ge-0/0/0', device_id: 488).flatten
NetboxClientRuby::LocalError: Received 'nil' while replacing ':id' in 'dcim/interfaces/:id.json' with a value.
from /usr/local/bundle/gems/netbox-client-ruby-0.5.2/lib/netbox_client_ruby/entity.rb:310:in `block in replace_path_variables_in'
I've worked around this issue by concatting arrays, however, I think it is a bug that the following code throws an error:
The problem is Interface responds to flatten and throws an error: