Class: Editus::Action
- Inherits:
-
Object
- Object
- Editus::Action
- Defined in:
- lib/editus/actions.rb
Instance Attribute Summary collapse
-
#changes ⇒ Object
Returns the value of attribute changes.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
-
#model_id ⇒ Object
Returns the value of attribute model_id.
-
#model_name ⇒ Object
Returns the value of attribute model_name.
-
#type ⇒ Object
Returns the value of attribute type.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Action
constructor
A new instance of Action.
- #save ⇒ Object
Constructor Details
#initialize(**args) ⇒ Action
Returns a new instance of Action.
37 38 39 40 41 42 43 44 45 |
# File 'lib/editus/actions.rb', line 37 def initialize **args @id = args[:id] || SecureRandom.uuid @created_at = args[:created_at] || Time.now.utc @model_id = args[:model_id] @model_name = args[:model_name] @changes = args[:changes] @type = args[:type] @user = args[:user] end |
Instance Attribute Details
#changes ⇒ Object
Returns the value of attribute changes.
35 36 37 |
# File 'lib/editus/actions.rb', line 35 def changes @changes end |
#created_at ⇒ Object
Returns the value of attribute created_at.
35 36 37 |
# File 'lib/editus/actions.rb', line 35 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id.
35 36 37 |
# File 'lib/editus/actions.rb', line 35 def id @id end |
#model_id ⇒ Object
Returns the value of attribute model_id.
35 36 37 |
# File 'lib/editus/actions.rb', line 35 def model_id @model_id end |
#model_name ⇒ Object
Returns the value of attribute model_name.
35 36 37 |
# File 'lib/editus/actions.rb', line 35 def model_name @model_name end |
#type ⇒ Object
Returns the value of attribute type.
35 36 37 |
# File 'lib/editus/actions.rb', line 35 def type @type end |
#user ⇒ Object
Returns the value of attribute user.
35 36 37 |
# File 'lib/editus/actions.rb', line 35 def user @user end |