class AWS::Record::Validator

def passes_if_condition? record

def passes_if_condition? record
  case options[:if]
  when nil            then true
  when Proc           then options[:if].call(record)
  when String, Symbol then record.send(options[:if])
  else
    raise 'invalid :if option, must be nil, a method name or a Proc'
  end
end