Sha256: 9dfb67716570d8adf25c923ad5c806ea484d86cde36842a091ec012a5ab1a0ff

Contents?: true

Size: 465 Bytes

Versions: 6

Compression:

Stored size: 465 Bytes

Contents

require 'nokogiri'

class ConfigureTask
  def initialize configure_xml
    @configure_xml =  Nokogiri::XML(configure_xml)
    @configure_xml.remove_namespaces!
  end

  def url
    @configure_xml.xpath("//Task/@href").to_s
  end

  def complete?
    @configure_xml.xpath("//Task/@status").to_s == "success"
  end

  def error?
    puts @configure_xml.xpath("//Task/Error/@majorErrorCode")

    !@configure_xml.xpath("//Task/Error/@majorErrorCode").empty?
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
vcloud-net-spinner-0.2.0 lib/vcloud_network_configurator/configure_task.rb
vcloud-net-spinner-0.1.6 lib/vcloud_network_configurator/configure_task.rb
vcloud-net-spinner-0.1.5 lib/vcloud_network_configurator/configure_task.rb
vcloud-net-spinner-0.1.4 lib/vcloud_network_configurator/configure_task.rb
vcloud-net-spinner-0.1.2 lib/vcloud_network_configurator/configure_task.rb
vcloud-network-configurator-0.1.0 lib/vcloud_network_configurator/configure_task.rb