# File lib/hammer_cli_foreman/commands.rb, line 142 def get_resource_id(resource, options={}) if options[:scoped] opts = resolver.scoped_options(resource.singular_name, all_options) else opts = all_options end begin resolver.send("#{resource.singular_name}_id", opts) rescue HammerCLIForeman::MissingSeachOptions => e if (options[:required] == true || resource_search_requested(resource, opts)) logger.info "Error occured while searching for #{resource.singular_name}" raise e end end end