Methods

Class/Module Index [+]

Quicksearch

HammerCLIForeman::IdArrayParamsFilter

Public Class Methods

new(options={}) click to toggle source
# File lib/hammer_cli_foreman/param_filters.rb, line 51
def initialize(options={})
  @required = !(options[:only_required] == false)
end

Public Instance Methods

filter(params) click to toggle source
# File lib/hammer_cli_foreman/param_filters.rb, line 55
def filter(params)
  params = ParamsFlattener.new.filter(params)
  params = params.select{ |p| p.name.end_with?("_ids") }
  params = params.select{ |p| p.required? } if @required
  params
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.