def modify()

in footmark/ess/rule.py [0:0]


    def modify(self, adjustment_type=None, adjustment_value=None, name=None, cooldown=None):
        """
        modify the scaling rule

        :type force: bool
        :param force: Forces the instance to stop

        :rtype: bool
        :return: result of modifying
        """
        update = False
        if adjustment_type and self.adjustment_type != adjustment_type:
            update = True
        if adjustment_value and self.adjustment_value != adjustment_value:
            update = True
        if name and self.name != name:
            update = True
        if cooldown is not None and self.cooldown != cooldown:
            update = True

        if not update:
            return False

        return self.connection.modify_rule(self.id, adjustment_type=adjustment_type, adjustment_value=adjustment_value,
                                           name=name, cooldown=cooldown)