Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

Commit

Permalink
Merge pull request #45 from bortels/master
Browse files Browse the repository at this point in the history
Adding `to_json` to `RbVmomi::BasicTypes::DataObject`
  • Loading branch information
jrgarcia authored Aug 18, 2016
2 parents 5ee8ec4 + fd83a5c commit 4fde127
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/rbvmomi/basic_types.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ def pretty_print q
q.text ')'
end

def to_json(*args)
h = self.props
m = h.merge({ JSON.create_id => self.class.name })
m.to_json(*args)
end

init
end

Expand Down

0 comments on commit 4fde127

Please sign in to comment.