validate_actions

in lib/crawler/data/extraction/rule.rb [48:58]


        def validate_actions
          unless ACTIONS.include?(@action)
            raise ArgumentError,
                  "Extraction rule action `#{@action}` is invalid; value must be one of #{ACTIONS.join(', ')}"
          end

          return unless @action == ACTION_TYPE_SET && @value.nil?

          raise ArgumentError, "Extraction rule value can't be blank when action is `#{ACTION_TYPE_SET}`"
        end