def update_state(state, active)
      if !active.nil?
        @states.each do |s, v|
          v[1] = active if s == state
          classify_state v
        end
      end
    end
def update_state(state, active)
      if !active.nil?
        @states.each do |s, v|
          v[1] = active if s == state
          classify_state v
        end
      end
    end
Update the value of the state.

 @param [String] state The state name
 @param [Boolean] active The new value of the state. Pass
   true to enable and set the CSS class
   false to disable and remove the CSS class
   nil to skip altering state and the CSS class