module XML::Mapping::Classes_by_rootelt_names

Public Class Methods

classes_for(rootelt_name, mapping) click to toggle source
# File lib/xml/mapping/base.rb, line 95
def classes_for rootelt_name, mapping
  (self[rootelt_name] || {})[mapping] || []
end
create_classes_for(rootelt_name, mapping) click to toggle source
# File lib/xml/mapping/base.rb, line 92
def create_classes_for rootelt_name, mapping
  (self[rootelt_name] ||= {})[mapping] ||= []
end
ensure_exists(rootelt_name, mapping, clazz) click to toggle source
# File lib/xml/mapping/base.rb, line 101
def ensure_exists rootelt_name, mapping, clazz
  clazzes = create_classes_for(rootelt_name, mapping)
  clazzes << clazz unless clazzes.include? clazz
end
remove_class(rootelt_name, mapping, clazz) click to toggle source
# File lib/xml/mapping/base.rb, line 98
def remove_class rootelt_name, mapping, clazz
  classes_for(rootelt_name, mapping).delete clazz
end