module Roqua module StatusChecks module CheckLoadBalancerMember InvalidStatus = Class.new(StandardError) VALID_STATES = %w(on off) def self.balancer_member?(path) state = ::File.read(path).strip raise InvalidStatus, "Invalid state: #{state}" unless VALID_STATES.include?(state) state == "on" end end end end