class HOM::AttributeList
Public Class Methods
new()
click to toggle source
# File lib/hom.rb, line 95 def initialize @index = {} end
Public Instance Methods
set(name, value = Undefined)
click to toggle source
# File lib/hom.rb, line 99 def set(name, value = Undefined) @index[name.to_s] = value end
to_hash()
click to toggle source
# File lib/hom.rb, line 103 def to_hash @index end
update(object)
click to toggle source
# File lib/hom.rb, line 107 def update(object) case object when NilClass :pass when Hash object.each { |k, v| set(k, v) } when Array object.each { |item| update(item) } else set(object) end return self end