<commit_before>module ERM
  class Attribute
    attr_reader :type, :options, :default_value

    def initialize(type, options)
      @type          = type
      @options       = options
      @default_value = options.fetch(:default_value)
    end

    def define_accessor_methods(attribute_set)
      attribute_set.define_reader_method(self, name,       options[:reader])
      attribute_set.define_writer_method(self, "#{name}=", options[:writer])
    end

  end
end<commit_msg>extend Options and add buidler and lazy? methods<commit_after>module ERM
  class Attribute
    extend Options

    accept_options :visibility, :default, :as

    attr_reader :type, :options, :default_value

    def self.builder(type, options={})
      Builder.call(type, options)
    end

    def initialize(type, options)
      @type          = type
      @options       = options
      @default_value = options.fetch(:default_value)
    end

    def lazy?
      kind_of?(LazyDefault)
    end

    def define_accessor_methods(attribute_set)
      attribute_set.define_reader_method(self, name,       options[:reader])
      attribute_set.define_writer_method(self, "#{name}=", options[:writer])
    end

  end
end
{'fraction_non_alphanumeric': 0.09304274937133278, 'fraction_numerical': 0.0, 'mean_word_length': 3.117241379310345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3213757', 'n_tokens_mistral': 356, 'n_tokens_neox': 347, 'n_words': 80}