
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@redhat.com> (cherry picked from commit b2be27338cfb531a36e18b12293dd527da059772) --- 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/60796 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: sdk_4.0 Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>