Class: Panda::CMS::Admin::UserActivityComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Panda::CMS::Admin::UserActivityComponent
- Defined in:
- app/components/panda/cms/admin/user_activity_component.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
Returns the value of attribute model.
-
#time ⇒ Object
Returns the value of attribute time.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
-
#initialize(model: nil, at: nil, user: nil) ⇒ UserActivityComponent
constructor
A new instance of UserActivityComponent.
Constructor Details
#initialize(model: nil, at: nil, user: nil) ⇒ UserActivityComponent
Returns a new instance of UserActivityComponent.
12 13 14 15 16 |
# File 'app/components/panda/cms/admin/user_activity_component.rb', line 12 def initialize(model: nil, at: nil, user: nil) @model = model @user = user if user.is_a?(::Panda::Core::User) @time = at if at.is_a?(::ActiveSupport::TimeWithZone) end |
Instance Attribute Details
#model ⇒ Object
Returns the value of attribute model.
7 8 9 |
# File 'app/components/panda/cms/admin/user_activity_component.rb', line 7 def model @model end |
#time ⇒ Object
Returns the value of attribute time.
7 8 9 |
# File 'app/components/panda/cms/admin/user_activity_component.rb', line 7 def time @time end |
#user ⇒ Object
Returns the value of attribute user.
7 8 9 |
# File 'app/components/panda/cms/admin/user_activity_component.rb', line 7 def user @user end |