# 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 raise e unless (options[:required] == false) end end