Sha256: 21e73a25825315f2922de98dea39f8ea1cce1bce0e7403dde0aa7f36911f2ec4

Contents?: true

Size: 484 Bytes

Versions: 13

Compression:

Stored size: 484 Bytes

Contents

require "rexml/document"
require 'erb'
require 'ostruct'

module Fog
  module Compute
    module LibvirtUtil

      # finds a value from xml
      def document path, attribute=nil
        return nil if new?
        xml = REXML::Document.new(@xml_desc)
        attribute.nil? ? xml.elements[path].text : xml.elements[path].attributes[attribute]
      end

      class ErbBinding < OpenStruct
        def get_binding
          return binding()
        end
      end


    end
  end
end

Version data entries

13 entries across 13 versions & 4 rubygems

Version Path
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb
fog-1.1.2 lib/fog/libvirt/models/compute/util.rb
fog_tractical-1.1.4 lib/fog/libvirt/models/compute/util.rb
fog_tractical-1.1.3 lib/fog/libvirt/models/compute/util.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb
fog-1.1.1 lib/fog/libvirt/models/compute/util.rb
fog-1.1.0 lib/fog/libvirt/models/compute/util.rb
brightbox-cli-0.15.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb
tag-fog-1.0.1 lib/fog/libvirt/models/compute/util.rb
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/lib/fog/libvirt/models/compute/util.rb
fog-1.0.0 lib/fog/libvirt/models/compute/util.rb