class Admino::Query::Configuration::FilterGroup

Attributes

name[R]
options[R]
scopes[R]

Public Class Methods

new(name, scopes, options = {}) click to toggle source
# File lib/admino/query/configuration.rb, line 35
def initialize(name, scopes, options = {})
  options.symbolize_keys!
  options.assert_valid_keys(
    :include_empty_scope,
    :default
  )

  @name = name.to_sym
  @scopes = scopes.map(&:to_sym)
  @options = options
end

Public Instance Methods

default_scope() click to toggle source
# File lib/admino/query/configuration.rb, line 51
def default_scope
  if options[:default]
    options[:default].to_sym
  end
end
include_empty_scope?() click to toggle source
# File lib/admino/query/configuration.rb, line 47
def include_empty_scope?
  @options.fetch(:include_empty_scope) { false }
end