Sha256: f18ace558201d992f9d674cb8ff84029a034e77e8b9583c7fcb35a9920a7b7f2

Contents?: true

Size: 649 Bytes

Versions: 24

Compression:

Stored size: 649 Bytes

Contents

class TestModelWithAttributeDefaultValues

  # stub ActiveRecord::Base methods

  def self.after_initialize(method_or_proc)
    @@after_initialize_method_or_proc = method_or_proc
  end

  def initialize(*args)
    args.extract_options!.each do |key, value|
      self.send("#{key}=", value)
    end

    @@after_initialize_method_or_proc.respond_to?(:call) ?
      @@after_initialize_method_or_proc.call(self) :
      send(@@after_initialize_method_or_proc)
  end

  def read_attribute(attrib)
    self.send(attrib)
  end

  def write_attribute(attrib, value)
    self.send("#{attrib}=", value)
  end

  include Riveter::AttributeDefaultValues

end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
riveter-0.8.3 spec/support/test_model_with_attribute_default_values.rb
riveter-0.8.2 spec/support/test_model_with_attribute_default_values.rb
riveter-0.8.1 spec/support/test_model_with_attribute_default_values.rb
riveter-0.8.0 spec/support/test_model_with_attribute_default_values.rb
riveter-0.7.0 spec/support/test_model_with_attribute_default_values.rb
riveter-0.6.0 spec/support/test_model_with_attribute_default_values.rb
riveter-0.3.0 spec/support/test_model_with_attribute_default_values.rb
riveter-0.2.1 spec/support/test_model_with_attribute_default_values.rb
riveter-0.2.0 spec/support/test_model_with_attribute_default_values.rb
riveter-0.1.1 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.15 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.14 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.13 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.12 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.11 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.10 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.9 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.8 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.7 spec/support/test_model_with_attribute_default_values.rb
riveter-0.0.6 spec/support/test_model_with_attribute_default_values.rb