lib/virtualbox/storage_controller.rb in virtualbox-0.6.1 vs lib/virtualbox/storage_controller.rb in virtualbox-0.7.0

- old
+ new

@@ -45,18 +45,18 @@ attribute :name, :readonly => true attribute :port_count attribute :bus, :readonly => true attribute :controller_type - class <<self + class << self # Populates a relationship with another model. # # **This method typically won't be used except internally.** # # @return [Array<StorageController>] def populate_relationship(caller, data) - if data.is_a?(COM::Interface::Machine) + if data.is_a?(COM::Util.versioned_interface(:Machine)) populate_array_relationship(caller, data) elsif data.is_a?(MediumAttachment) populate_attachment_relationship(caller, data) end end @@ -155,6 +155,6 @@ machine = session.machine machine.remove_storage_controller(name) end end end -end \ No newline at end of file +end