<commit_before>require 'fog/core/model'

module Fog
  module Compute
    class Serverlove

      class Drive < Fog::Model

        identity :drive

        attribute :name   
        attribute :user
        attribute :size
        attribute :claimed
        attribute :status
        attribute :encryption_cipher, :aliases => 'encryption:cipher'
        
        def save
          attributes = {}
          
          if(identity)
            attributes = connection.update_drive(identity, allowed_attributes).body
          else
            requires :name
            requires :size
            attributes = connection.create_drive(allowed_attributes).body
          end
          
          merge_attributes(attributes)
          true
        end

        def destroy
          requires :identity
          connection.destroy_drive(identity)
          true
        end
        
        def allowed_attributes
          allowed = [:name, :size]<commit_msg>Returning self is totes better than bools.<commit_after>require 'fog/core/model'

module Fog
  module Compute
    class Serverlove

      class Drive < Fog::Model

        identity :drive

        attribute :name   
        attribute :user
        attribute :size
        attribute :claimed
        attribute :status
        attribute :encryption_cipher, :aliases => 'encryption:cipher'
        
        def save
          attributes = {}
          
          if(identity)
            attributes = connection.update_drive(identity, allowed_attributes).body
          else
            requires :name
            requires :size
            attributes = connection.create_drive(allowed_attributes).body
          end
          
          merge_attributes(attributes)
          self
        end

        def destroy
          requires :identity
          connection.destroy_drive(identity)
          self
        end
        
        def allowed_attributes
          allowed = [:name, :size]
{'fraction_non_alphanumeric': 0.056041131105398455, 'fraction_numerical': 0.0, 'mean_word_length': 1.5740740740740742, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3094969', 'n_tokens_mistral': 457, 'n_tokens_neox': 442, 'n_words': 119}