# File lib/serverspec/type/service.rb, line 30 def monitored_by?(monitor, monitor_name) check_method = "check_service_is_monitored_by_#{monitor}".to_sym # use the with_name value if set instead of the service name monitor_name = (monitor_name ? monitor_name : @name) res = @runner.send(check_method, monitor_name) end