Class: Smplkit::Audit::Action
- Inherits:
-
Struct
- Object
- Struct
- Smplkit::Audit::Action
- Defined in:
- lib/smplkit/audit/models.rb
Overview
A distinct action slug seen for the account.
Same shape as ResourceType — id and action are the same value. created_at is the earliest sighting; when the parent list call filtered by resource_type, this is the first sighting of that specific (action, resource_type) triple, not the action overall.
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#id ⇒ Object
Returns the value of attribute id.
Class Method Summary collapse
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action
116 117 118 |
# File 'lib/smplkit/audit/models.rb', line 116 def action @action end |
#created_at ⇒ Object
Returns the value of attribute created_at
116 117 118 |
# File 'lib/smplkit/audit/models.rb', line 116 def created_at @created_at end |
#id ⇒ Object
Returns the value of attribute id
116 117 118 |
# File 'lib/smplkit/audit/models.rb', line 116 def id @id end |
Class Method Details
.from_resource(resource) ⇒ Object
117 118 119 120 121 122 123 124 |
# File 'lib/smplkit/audit/models.rb', line 117 def self.from_resource(resource) attrs = resource.attributes new( id: resource.id, action: attrs.action || resource.id, created_at: attrs.created_at ) end |