class PIM::SectionAttribute

Attributes

name[R]
params[R]

Public Class Methods

new(name, params = {}) click to toggle source
# File pim.rb, line 7060
def initialize name, params = {}
  @name = name
  @params = params.delete_if { |k, v| k == :name }
end

Public Instance Methods

==(other) click to toggle source
# File pim.rb, line 7065
def ==(other)
  case other.class
    when String, Symbol
      PIM::Utils.is_equal?(@name.to_s, other.to_s)
    else
      PIM::Utils.is_equal?(@name.to_s, other.name.to_s) &&
      PIM::Utils.is_equal?(@params, other.params)
  end
end
as_json(opts = {}) click to toggle source
# File pim.rb, line 7075
def as_json opts = {}
  hash = {
    :name => @name
  }
  hash.merge!(PIM::Utils.symbolized_hash(params))
  hash
end