Class: OpenNebula::XMLElement

Inherits:
Object
  • Object
show all
Defined in:
service/objects/xml_element.rb

Overview

Extensions for OpenNebula::XMLElement class

Instance Method Summary collapse

Instance Method Details

#name!Object

Performs info and returns name



14
15
16
17
# File 'service/objects/xml_element.rb', line 14

def name!
  info!
  name
end

#to_hash!Object

Calls info! method and returns a hash representing the object



4
5
6
# File 'service/objects/xml_element.rb', line 4

def to_hash!
  self.info! || self.to_hash
end

#to_json(opts = {}) ⇒ Object

Serializer method



20
21
22
# File 'service/objects/xml_element.rb', line 20

def to_json opts = {}
  to_hash!.to_json opts
end

#to_xml!Object

Calls info! method and returns a xml representing the object



9
10
11
# File 'service/objects/xml_element.rb', line 9

def to_xml!
  self.info! || self.to_xml
end