class Keyremac::Item

Public Class Methods

identifier() click to toggle source
# File lib/keyremac/base.rb, line 83
def self.identifier
  @@identifier
end
new(name = nil) click to toggle source
# File lib/keyremac/base.rb, line 90
def initialize(name = nil)
  @children = []
  @name = name || @@identifier
  @@identifier = @@identifier.succ
end
reset_identifier() click to toggle source
# File lib/keyremac/base.rb, line 86
def self.reset_identifier
  @@identifier = 'a'
end

Public Instance Methods

dump(xml) click to toggle source
# File lib/keyremac/dump.rb, line 78
def dump(xml)
  xml.item do
    xml.name @name
    xml.identifier "private.#{@name}"
    @children.each { |child|
      child.dump xml
    }
  end
end