lib/todoable_api/item.rb
# Shortcut to mark an item as finished
Shortcut to mark an item as finished
Shortcut to mark an item as finished
def finish
      return true if finished?
      begin
        self.class.mark_as_finished(list_id, id)
        attributes = list.reload.attributes["items"].find { |i| i["id"] == id }
        initialize(attributes)
        true
      rescue TodoableApi::NotFound, TodoableApi::UnprocessableEntity
        false
      end
    end
def finish return true if finished? begin self . class . mark_as_finished ( list_id , id ) attributes = list . reload . attributes [ "items" ] . find { | i | i [ "id" ] == id } initialize ( attributes ) true rescue TodoableApi :: NotFound , TodoableApi :: UnprocessableEntity false end end
Shortcut to mark an item as finished
Shortcut to mark an item as finished