Closed cimnine closed 6 years ago
The constructor can now be used to pass initial 'dirty' values:
s=NetboxClientRuby::DCIM::Site.new(name: 'Zurich', slug: 'zrh') s.save
So, theoretically, this can be used to fetch and update a site in one operation:
s=NetboxClientRuby::DCIM::Site.new(id: 1, name: 'Zurich', slug: 'zrh') s.save
This would update the name and slug for the site with the id 1. But the ordinal way should be preferred, because it is more explicit:
NetboxClientRuby.dcim.site(1).update(name: 'Zurich', slug: 'zrh')
The constructor can now be used to pass initial 'dirty' values:
So, theoretically, this can be used to fetch and update a site in one operation:
This would update the name and slug for the site with the id 1. But the ordinal way should be preferred, because it is more explicit: