Class: ActiveRecord::Temporal::ApplicationVersioning::ApplicationVersioned::Original
- Inherits:
-
Object
- Object
- ActiveRecord::Temporal::ApplicationVersioning::ApplicationVersioned::Original
- Defined in:
- lib/activerecord/temporal/application_versioning/application_versioned.rb
Instance Attribute Summary collapse
-
#klass ⇒ Object
readonly
Returns the value of attribute klass.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#time ⇒ Object
readonly
Returns the value of attribute time.
Instance Method Summary collapse
-
#initialize(klass, time, **options) ⇒ Original
constructor
A new instance of Original.
- #with(attributes) ⇒ Object
Constructor Details
#initialize(klass, time, **options) ⇒ Original
Returns a new instance of Original.
66 67 68 69 70 |
# File 'lib/activerecord/temporal/application_versioning/application_versioned.rb', line 66 def initialize(klass, time, **) @klass = klass @time = time = end |
Instance Attribute Details
#klass ⇒ Object (readonly)
Returns the value of attribute klass.
64 65 66 |
# File 'lib/activerecord/temporal/application_versioning/application_versioned.rb', line 64 def klass @klass end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
64 65 66 |
# File 'lib/activerecord/temporal/application_versioning/application_versioned.rb', line 64 def end |
#time ⇒ Object (readonly)
Returns the value of attribute time.
64 65 66 |
# File 'lib/activerecord/temporal/application_versioning/application_versioned.rb', line 64 def time @time end |
Instance Method Details
#with(attributes) ⇒ Object
72 73 74 75 76 77 78 79 |
# File 'lib/activerecord/temporal/application_versioning/application_versioned.rb', line 72 def with(attributes) new_record = klass.new(attributes) new_record.set_time_dimension_start(time) new_record.save if [:save] new_record end |