Change in ovirt-engine-sdk-ruby[master]: Add "dig" method
juan.hernandez at redhat.com
juan.hernandez at redhat.com
Fri Jul 15 10:15:02 UTC 2016
Juan Hernandez has submitted this change and it was merged.
Change subject: Add "dig" method
......................................................................
Add "dig" method
This patch adds to the types of the SDK a "dig" method similar to the
"dig" method introduced in Ruby 2.3 for hashes. For example, to find the
identifier of the first disk attached to the virtual machine referenced
from an event:
event = ...
disk_id = event.dig(:vm, :disk_attachments, 0, :disk, :id)
Change-Id: Ied3c1e2b661f2eba1aa086232751d8c9e824538f
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M sdk/lib/ovirtsdk4/type.rb
A sdk/spec/type_spec.rb
2 files changed, 158 insertions(+), 0 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit https://gerrit.ovirt.org/60763
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ied3c1e2b661f2eba1aa086232751d8c9e824538f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine-sdk-ruby
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
More information about the Engine-commits
mailing list