class PIM::Filter

Attributes

label[R]
name[R]
query[R]
roles[R]

Public Class Methods

new(name, label, query, roles) click to toggle source
# File pim.rb, line 7588
def initialize name, label, query, roles
  @name = name
  @label = label
  @query = query
  @roles = roles
end

Public Instance Methods

as_json(opts = {}) click to toggle source
# File pim.rb, line 7595
def as_json opts = {}
  hash = {
    :name => @name,
    :label => (@label || @name),
    :query => @query
  }
  hash[:roles] = @roles if not is_empty?(@roles)
  hash
end