class PIM::Layouts::LayoutMapping

Public Class Methods

new(mapping = nil) click to toggle source
# File pim.rb, line 6098
def initialize mapping = nil
  members.each { |m| self[m] = m.to_s }
  if not mapping.nil?
    mapping.each_pair do |k, v|
      self[k] = v.to_s if members.include?(k)
    end
  end
end

Public Instance Methods

as_json() click to toggle source
# File pim.rb, line 6107
def as_json
  hash = {}
  members.each do |m|
    hash[m] = self[m] || m.to_s
  end
  hash
end