Class: Kamelopard::ResourceMap

Inherits:
Object
  • Object
show all
Defined in:
lib/kamelopard/classes.rb

Overview

Sub-object in the KML Model class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(aliases = []) ⇒ ResourceMap

Returns a new instance of ResourceMap.


2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
# File 'lib/kamelopard/classes.rb', line 2393

def initialize(aliases = [])
    @aliases = []
    if not aliases.nil? then
        if aliases.kind_of? Enumerable then
            @aliases += aliases
        else
            @aliases << aliases
        end
    end
end

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases


2392
2393
2394
# File 'lib/kamelopard/classes.rb', line 2392

def aliases
  @aliases
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object


2404
2405
2406
2407
2408
2409
# File 'lib/kamelopard/classes.rb', line 2404

def to_kml(elem = nil)
    k = XML::Node.new 'ResourceMap'
    @aliases.each do |a| k << a.to_kml(k) end
    elem << k unless elem.nil?
    k
end